Setting hostname on Leopard permanently

by rp

One of the annoying things about Leopard is that it keeps changing the hosting to whatever the DNS server dishes out and in my case its something like 12-32-145-23.config, not the most pretty/useful naming convention.

Also means that it looks really ugly on the terminal. So here are the commands to reset it permanently so that it doesn’t change again after a reboot.

$ sudo hostname foobox.local
$ sudo scutil --set HostName foobox.local
$ sudo scutil --set LocalHostName foobox