Renaming a Mac computer

Discussion in 'Mac Basics and Help' started by conamor, Aug 12, 2016.

  1. conamor macrumors 6502

    conamor

    Joined:
    Jun 27, 2013
    #1
    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!
     
  2. Bruno09, Aug 12, 2016
    Last edited: Aug 12, 2016

    Bruno09 macrumors 68020

    Joined:
    Aug 24, 2013
    Location:
    Far from here
    #2
    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.





     
  3. conamor thread starter macrumors 6502

    conamor

    Joined:
    Jun 27, 2013
  4. satcomer, Aug 12, 2016
    Last edited: Aug 12, 2016

Share This Page