Knowledge Base
MilesWeb / How-Tos

How to change server’s hostname on linux CentOS ?

Approx. read time : 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 hosting OR dedicated servers by following the steps below.

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

# hostname server.domain.com

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

NETWORKING=”yes”
NETWORKING_IPV6=”yes”
HOSTNAME=”server.domain.com”
DOMAINNAME=domain.com

Doing this, hostname for your server is set.

admin
With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.