Centos: Checking and Renaming the Server Hostname

A quicky this, for personal reference more than anything else.

Checking the Hostname
From within the console, run hostname to check the current hostname.

Changing the Hostname
To change the hostname run

hostname  mynewhostname.com

check it has happened with hostname and then restart the network

systemctl restart network

(or simply network restart on older centos versions)

Facebook Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Apply your human brain cells and complete this highly complicated maths problem *