1) Issue the command "sudo vi /etc/hostconfig"
2) Add the line HOSTNAME=my-hostname to this file (pressing i to enter edit mode).
3) Save and close (that's Esc
The HOSTNAME line may already exist on your system in which case its value will be "-AUTOMATIC-". In that case you just replace that with your hostname. It was not there on my Leopard (client) machine.
Oh yeah, thanks to Robert Brewer for teaching me how to do this. Take a look at his article if you are interested in getting some more detailed information about the whole hostname determination business on OS X.
[1]: For those of you not used to using a terminal a new command-line in a terminal typically starts with "username@hostname:top-level-path$". E.g., my prompt right now shows "madsk@leela:Development$".
No comments:
Post a Comment