Setting the hostname

The hostname is set during the boot process to the contents of the file /etc/hostname. Edit this file with either vi or ee. The hostname takes the form of hostname.domain, where the domain is entirely optional.

Editing this file will cause the hostname to be set correctly on the next boot (and subsequently thereafter). However, it will not take effect until after reboot. In order to set the hostname now, use the hostname command with your desired hostname as it's argument.

# Example - set the hostname to zaphod.heartofgold.net
hostname.heartofgold.net