Twitter Facebook Google+ LinkedIn

How to Change the Server Hostname on CentOS ?

This tutorial will show you how to change the dedicated server hostname on CentOS.  The server hostname can be changed in two ways shown below.

The first way is by using the “Hostname command”.

Enter the following command into the console:

hostname my.server.com

Once you enter the above command, the server hostname will be automatically changed.

OR

you can change the server hostname using the “Editing network file”.

Enter the following command into the console:

vi /etc/sysconfig/network

After entering the command you will see something like this:

NETWORKING=”yes”
GATEWAY=”192.0.2.2″
HOSTNAME=”some.servername.com”

Simply, change your “hostname” there and you are done. I hope it will help.

Like this post ?

Share on your Social Networking Profile ( Facebook, Twitter & Google+ ) and get a flat 10% Recurring discount on our VPS Hosting and Dedicated Servers.

Email us the shared link at : sales@eukhost.com or speak to our live chat operator now, by clicking on the “Live Chat” Scroller on the left-hand side of this page and we will provide you with the discount Coupon right away!

Be Sociable, Share!


    Online 24X7 Chat Support
     
     
    Telephone
    Toll Free
    Online chat
     
    Online 24X7 Email Support
     
    Emails
     
     
     
    Support
    Support email
    sales
    Sales email
     
    Billing
    Billing email
     
       
    Latest Tutorials & Articles (Updated Daily)
    http://blog.eukhost.com
      Forums :
    http://www.eukhost.com/forums/