How to change hostname in linux

STEP 1

Redhat / CentOS / Fedora

vi /etc/sysconfig/network

Debian / Ubuntu

vi /etc/hostname

Slackware / Suse / OpenSuse

vi /etc/HOSTNAME

 

STEP 2

vi /etc/hosts

 

STEP 3

echo “servername” > /proc/sys/kernel/hostname

 

via Linux Change Hostname.

You may also like...

Leave a Reply