Changing hostname on RHEL

1. Change the ^HOSTNAME line in /etc/sysconfig/network

2. Change the hostname (FQDN and alias) in /etc/hosts

3. Run /bin/hostname new_hostname for the hostname change to take effect immediately.

4. Run /sbin/service syslog restart for syslog to log using the new hostname.

A reboot is not required to change the system hostname.

More information:
http://kbase.redhat.com/faq/FAQ_45_2062.shtm

Back to brandonhutchinson.com.
Last modified: 2007/07/11