Centos – change server name

changing the name on the centos vm is easy as pie.

two methods though unsure why bother on the second
1. from a command line enter
hostname [newhostname]

Upon entering the above command, the server hostname will be automatically changed.

or

2.

you can change the server hostname by editing the network file:

from a command line:

vi /etc/sysconfig/network

By default the file looks like this.

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=livedvd.centos

Simply, change “livedvd.cento” to your chosen value and you are done.