How to change the computer name of your Mac

Changing the Computer Name of your Mac is a great way to not only personalize it, but more importantly, to easily locate it within a network when multiple other Macs are present.

While working on a series of posts about Find My iPhone, I realized that my iMac didn’t have a specific Computer Name attached to it. When in Find My iPhone, it would just show up as Unknown. I wasn’t sure how that happened, but I knew I wanted to have a proper name for it just so I could recognize it when looking for it on the local network or when sharing files and documents with it over AirDrop.

The steps to set or change Mac’s name are quick and easy, but I figured that if you already know how to do it, maybe this post will be a reminder for you to check that your Mac has indeed been given a name that makes sense to you. If not, I’ll show you how to do just that.

Mac Tips banners

Change the name of your Mac in System Preferences

These steps will work to change your Mac device name, no matter what Mac you are using (iMac, MacBook, MacBook Pro, Mac mini, etc.)

1) In the menu bar, go to  > System Preferences.

2) Click on Sharing.

system preferences sharing

3) In the Computer Name box, type in the name you want to use for your computer.

Change Computer Name of your Mac

4) Close the window, and you’re done.

Rename your Mac with Terminal

For those that are comfortable with the command line, you may use Terminal to set a different name for your Mac.

1) Open the Terminal app on your Mac.

2) Type in the following command, making sure to replace YourNewComputerName with the name you want to set.

sudo scutil --set ComputerName YourNewComputerName

3) Press the Enter key.

4) Type your Mac’s passcode.

5) Reboot your Mac if the new name doesn’t reflect in System Preferences > Sharing.

Note: If you want to set a computer name that has spaces, enclose it in double quotation marks (” “). For example, to rename my Mac to Ankur M1 MacBook Pro, the Terminal command will be sudo scutil --set ComputerName "Ankur M1 MacBook Pro". If I don’t use the quotation marks (” “), Terminal will only use the first word (Ankur) and ignore the rest (M1 MacBook Pro).

Terminal Command to Rename Mac

As always, feel free to ask if you have any questions.

Check out next: