Sean's Musings as a Service

Sean's Musings as a Service

Update hostname on RHEL

  • Published:
  • categories: 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: