Hostname on OS X
Posted by rue, Sun Mar 02 05:34:00 UTC 2008
Looks like this may change in the future, but for now setting your hostname on Leopard is easiest with these two steps:
- `sudo vim /etc/hostconfig`
- Add @HOSTNAME=”machine.domain.tld” somewhere
- `sudo hostname machine.domain.tld` sets it for the current session so you do not need to restart etc.
The System Preferences > Sharing and Network have some options but I got tired of twiddling with them.
I think you’re looking for sclist with the HostName parameter. Took me a while to find when I first got my mbp.