Change of hostname for Redhat Linux/Cent OS /Fedora / Ubuntu / Suse Linux

1. Change of Hostname for Redhat / Fedora / Cent OS Linux 


First Check the Current  hostname Login as root or do su.

# hostname

It will show the current hostname for e.g.testserver

new hostname : prodserver

go to the file /etc/sysconfig/network

# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=testserver

change the HOSTNAME to new name e.g. prodserver & save the file & quit.
or prodserver.domain.com

After  this we need to reboot the server.
For  current change we can use the below mentioned command
# hostname prodsever

check the file /etc/hosts & edit the entry if there is any for the IP Address & Hostname



2. For Ubuntu Linux


# vi /etc/hostname

Delete old name and add new name:
prodserver.jogi.com
Save and close the file. Type the following command:
# hostname prodserver.jogi.com 
 
Change the /etc/hosts file with new hostname. 

3. For Suse Linux

#vi  /etc/HOSTNAME

 Delete old name and add new one:
prodserver.jogi.comSave and close the file. Type the following command:
hostname prodserver.jogi.com

update /etc/hosts file with new hostname 
 
 

 

Popular posts from this blog

Password Expiry notification for the users in zimbra 8.x within 7 Days for the email users

Zimbra backup open source for zimbra 8.x for 7 Days