Nội dung
In today’s article, AZDIGI will guide you to change the hostname on a Linux server using CentOS operating system. To change, you need to SSH into the server and do the following.
Check hostname
To check the current hostname, use the following command:
# hostname
Change hostname temporarily
The temporary hostname change will be lost if you reboot the server.
# hostname huongdan.dotrungquan.info
Change hostname permanently
To change the hostname permanently, run the following command:
# hostnamectl set-hostname help.dotrungquan.info
Then you check the status with the hostnamectl command, you will see the following information
So you have finished changing the hostname on the CentOS server already!