Sean's i/o Stream

Musings-as-a-Service

Update hostname on RHEL

  • June 08, 2012
  •   category: linux
  • tags: rhel, linux, networking

Quick steps for changing hostname from RedHat 1

  1. Update the $hostname line in /etc/sysconfig/network
  2. Update the $hostname in /etc/hosts
  3. Run /bin/hostname $hostname for the hostname change to take effect immediately.
  4. 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.

Reference:
Back to Top