Recent Changes - Search:




Red Hat Enterprise Linux How do I change my hostname.

Tools that we can use to change the hostname.

This procedure also works for a standalone system without a DNS subsystem.

setup - A text mode system configuration tool

redhat-config-network command

You can also run the redhat-config-network command in the Red Hat Enterprise Linux 3 and run system-config-network command in the Red Hat Enterprise Linux 4 and 5 , click on the "DNS" tab, and change the "Hostname" field.


1. IP hostnames or machine names can be changed dynamically with the command hostname and persistently by setting the HOSTNAME environment variable in /etc/sysconfig/network.


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.     


[root@localhost ~]# cat /etc/hosts		localhost.localdomain localhost
::1		localhost6.localdomain6 localhost6

[root@localhost ~]# cat /etc/sysconfig/network
[root@localhost ~]#

Edit - History - Print - Recent Changes - Search
Page last modified on August 20, 2012, at 10:52 AM