Setting hostname
From Linux & Open Source @ NUS
After completing the install of your Linux box, you'll want to start personalising it. First and foremost, you'll want to name your Linux box, give it it's own identity, set it apart from the rest of the Linux [boxen | http://en.wiktionary.org/wiki/boxen] out there.
Usually as 'root' (or using 'su -' or sudo)
# hostname newhostname
will do the trick.
However, with RedHat/Fedora distros, you need to edit the file /etc/sysconfig/network in order to permanently set the hostname of the box. Using the method will work, but only within the current shell session.
# nano /etc/sysconfig/network
change the line
HOSTNAME=localhost.localdomain
to
HOSTNAME=newhostname
