Knowledge Base

How To Assign a Hostname for CentOS Linux Server

This tutorial shows you how to assign a hostname for a CentOS Linux Server.

Step 1. Log in to the server console as root user.
Step 2. Open the file /etc/sysconfig/network using text editor, such as VI.
Step 3. Edit the variable HOSTNAME='your hostname goes here', save and exit.
Step 4. Reboot your server. Your server will boot up with the new hostname.

Congratulations, you have assigned a hostname for the CentOS Linux Server.

Did you find this article helpful?

* Your feedback is too short