How to set hostname on Centos 6?

In order to permanently set hostname on Centos 6 VPS you neew to run

# nano /etc/sysconfig/network

and set HOSTNAME=yourdomain.com
save and exit

You will have to reboot your VPS/server to see the changes take place
  • 85 Users Found This Useful
Was this answer helpful?

Related Articles

FFMPEG install on CentOS

How to install FFMPEG and FFMPEG-PHP install on CentOS 5.X To install FFMPEG please follow the...

How to change hostname on CentOS permanently

If you are installing LAMP on a new server and ran into the following issue with httpd during the...

CentOS: Start custom script automatically after network startup

Find the ifup-post under /etc/sysconfig/network-scripts. This scipt is called right after any...

Change hostname in CentOS

How to Change Hostname - CentOSThis KB helps user to change hostname on CentOS. By default your...

How to add a new user to CentOS

Open a terminal window and log in to your server via SSH.Create the user by entering the...