Update hostname on RHEL
- Published:
- categories: linux
- tags: rhel, linux, networking
Quick steps for changing hostname from RedHat 1
- Update the
$hostname
line in /etc/sysconfig/network - Update the
$hostname
in /etc/hosts - Run
/bin/hostname $hostname
for the hostname change to take effect immediately. - Reboot or run
/sbin/service syslog restart
for syslog to log using the new hostname.
A reboot is not required to change the system hostname.