Teaching an OS X machine its own name

ericmurphy

Registered
My G4 has a fully-qualified domain name associated with it. How do I get the system to know its own name? In other words, when I log in on the command line, I'd like to see [domainname.com:~] eric% rather than [adsl-xxx-xxx-xxx-xxx:~] eric%. Is this something I can do through NetInfo, or do I need to do it on the command line?




G4/500 AGP 1024 Meg Ram 80 Gig Ultra66
OS X 10.3.6
 
/etc/hostconfig has a line:

HOSTNAME=-AUTOMATIC-

replace it with
HOSTNAME=host.domain

and you should be good to go on the next reboot.
 
Well there are a few tricks in that question:
1. If you just want to change the command prompt you can do so by including something like set prompt = "[%n@domain.com %B%~%b]%# ". My computer is called homestar-runner.local but I jsut force that on the prompt.

2. scruffy is right, hosts.conf is probably the miost unixy-avenue and a correct one.

3. You can also go into netinfo under the /machines/localhost just go in and select "localhost" and select "name - localhost", then option-apple-N (or under the menu: New Value) and type in your own domain.com. This is how I get it to recognize my machine as the numerous qualified domains I have, and to force the rendezvous name if it's not connected to a network (which I believe, at least in earlier version of 10.3 was not set if you weren't connected to a network).
 
Back
Top