Snow Leopard Host Name

Discussion in 'Mac OS X Server, Xserve, and Networking' started by ViViDboarder, Oct 23, 2009.

  1. macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #1
    I just got an iMac and for some reason the host name is "new-host-2" and I would like to change it to something more descriptive.

    In my Network Preferences I have changed the computer name to "My iMac" but the host name stays the same. Ideas?
     
  2. macrumors 65816

    Joined:
    Jan 1, 2008
    #2
    I think you want System Preferences/Sharing/Computer Name and then a reboot.

    A.
     
  3. thread starter macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #3
    I may have just forgotten to reboot... Dang. I'll try when I get home.
     
  4. macrumors 68040

    calderone

    Joined:
    Aug 28, 2009
    Location:
    Seattle
    #4
    There are multiple names that you can change.

    Here are the commands you need to run to change them, simply put the name you would like in place of newName:

    Code:
    sudo scutil --set ComputerName newName
    Code:
    sudo scutil --set HostName newName
    Code:
    sudo scutil --set LocalHostName newName
    You can also see what they are currently set to by replacing --set with --get, And of course do not include any name at the end.
     
  5. thread starter macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #5
    Very handy. Thanks. If only I had signal on my iPhone I'd take care of it now.
     
  6. thread starter macrumors 68040

    ViViDboarder

    Joined:
    Jun 25, 2008
    Location:
    USA
    #6
    Hey, so I did this and it worked but I just noticed that my router still picks up my iMac as new-host-# as well as my iPhone, which I ran the same commands on to set a hostname.

    I set both local and the regular host names but I have no results. My Macbook Pro shows up just fine though. It gets really annoying setting port forwarding on my router without recognizable hostnames.

    Any ideas? Is there a maximum length? Mine is currently 17 chars long but it seems like this would be fine after consulting Google.
     
  7. dyn
    macrumors 68000

    Joined:
    Aug 8, 2009
    Location:
    .nl
    #7
    If the dhcp/dns server also provides the hostname you will end up with whatever that dhcp/dns server gives you as a hostname. Check your router, it may still reference your iMac as new-host-# and change it if it does.
     
  8. macrumors newbie

    Joined:
    Mar 30, 2013
    #8
    Try the router itself:

    that worked for me - here's some clarification on the steps

    Access your router (usually 192.168.1.1 or something) and look for the list of devices. On my Verizon Router this is under "My Network." You should be able to rename them there.

    The problem I found was that my computer had two different IP connections to the router: one was the ethernet, the other was the wireless connection. The wireless connection had the correct name, the other one had "new-host-5". You can't have the same name for both, so rename the wireless connection to whatever, and then change the name of the ethernet connection to what you want. (Also I just disabled the Wireless connection, because I don't need both... Don't know if that was necessary though)
    Hope This helps!
     

Share This Page