Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  How to change server’s hostname on linux CentOS ?
Top Scroll

How to change server’s hostname on linux CentOS ?

 2 min

Hostname is to display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine. The domain name is also used by NIS/YP. It should be a FQDN (Fully Qualified Domain Name).

You can change the server’s hostname on your linux VPS OR dedicated servers by following the steps below.

Login to your server via SSH & set a hostname with command “hostname”

# hostname

Open the file /etc/sysconfig/network and set the hostname in this file. Save the file and quit.


Doing this, hostname for your server is set.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
Claim the discount before it’s too late. Use the coupon code:
Note: Copy the coupon code and apply it on checkout.