View Full Version : Snow Leopard Host Name
ViViDboarder
Oct 23, 2009, 09:20 AM
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?
Alrescha
Oct 23, 2009, 09:25 AM
In my Network Preferences I have changed the computer name to "My iMac" but the host name stays the same. Ideas?
I think you want System Preferences/Sharing/Computer Name and then a reboot.
A.
ViViDboarder
Oct 23, 2009, 09:35 AM
I think you want System Preferences/Sharing/Computer Name and then a reboot.
A.
I may have just forgotten to reboot... Dang. I'll try when I get home.
calderone
Oct 23, 2009, 10:22 AM
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:
sudo scutil --set ComputerName newName
sudo scutil --set HostName newName
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.
ViViDboarder
Oct 23, 2009, 10:25 AM
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:
sudo scutil --set ComputerName newName
sudo scutil --set HostName newName
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.
Very handy. Thanks. If only I had signal on my iPhone I'd take care of it now.
ViViDboarder
Nov 7, 2009, 10:16 AM
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.
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.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.