When you set up a new Mac, macOS gives the computer a generic name that includes the first name of the owner – "Tim's MacBook Pro," for example. This default name is used for identifying the device when someone wants to AirDrop a file to you, when you're connected to a local network, when you're using the Find My app, and more. But there are good reasons why you might want to change it.
If your Mac's network settings are reset, its name may be changed to "MacBook Pro" or something similar, making it harder to identify amongst a list of surrounding computers. Or maybe the Mac you're using still has the name of the previous owner. Perhaps you just want to give your Mac a recognizable but less personally identifying moniker, for privacy reasons.
Whatever the reason, here's how to change the name of your Mac.
- Launch System Preferences from your Mac's Dock, from the Applications folder, or from the Apple menu bar ( -> System Preferences...).
- Select Sharing in the preferences pane.
- Click on the field Computer Name: at the top.
- Highlight the current name with your cursor and enter a new one.
- Press Enter or click anywhere outside of the Sharing preference pane to set the new name.
You can check that the name has been changed by looking at the computer's local-network-name, which is given below the Computer Name field.