HOWTO: Changing the hostname
How to change the hostname of a computer running Sabayon Linux
During installation of Sabayon Linux you may have accepted the default hostname of "localhost", or you may have specified your own hostname (e.g. "sabayonx86", "neptune" or whatever). In either case, at some point you may want to change the current hostname, and this article explains how to do it.
1. Check the current hostname is properly configured
2. Edit /etc/conf.d/hostname
3. Edit /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost
127.0.0.1 acertm8215 localhost.localdomain localhost
4. Change the hostname stored in the kernel
To see the current hostname:
To change the current hostname:
5. Change netbios name in /etc/samba/smb.conf (as it defaulted to hostname "localhost")
netbios name = localhost
netbios name = acertm8215
6. Change the hostname in /etc/dhcp/dhclient.conf (otherwise it will still give your old hostname to other nodes on the network to which your PC is connected):
send host-name "localhost"; supersede host-name "localhost";
send host-name "acertm8215"; supersede host-name "acertm8215";
7. Reboot (or restart networking).
8. Repeat Step 1 to make sure the new hostname is set up correctly.
Article created by Fitzcarraldo on 8 January 2009.