Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

conamor

macrumors 6502
Original poster
Jun 27, 2013
364
21
Good day!

Does anyone have the procedure to properly rename a mac?

I know you can rename it from the Sharing option but I think the SMB name or the internal name of the machine keeps the old computer name. There might also be an option to change this one.

Thanks for the help!
 
Hi,

the Mac has 3 names :

1. the "HostName"
2. the "ComputerName"
3. the "LocalHostName"

The HostName is the one you see when you open a Terminal window, however, as long as a HostName has not be manually set, it uses the LocalHostName as replacement.

Example : Macbook-Pro:~ conamor$

To know what is what on your Mac, copy-paste in Terminal the following commands :

scutil --get HostName

scutil --get ComputerName

scutil --get LocalHostName

You likely will get the answer "not set" for the HostName : this mean it has never been set.

For the ComputerName you will get the name you set in System Preferences / Sharing / Computer name, example : Macbook Pro

For the LocalHostName you will get the name you can "Edit" : "Computers on your local network can access your computer at : (the LocalHostName)", example : Macbook-Pro

To set a name, use the command : sudo scutil --set

sudo scutil --set HostName "what you want here"

sudo scutil --set ComputerName "what you want here"

sudo scutil --set LocalHostName "what-you-want-here"

(keep the quotes, no spaces in the LocalHostName)

I think what you asked for is setting the HostName.

Hope this helps.





 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.