How to change hostname of a server

Simply ssh as root and type

hostname s1.boxintense.com

Then to make it permanent, modify this file via vi

vi /etc/sysconfig/network
vi /etc/hosts

Press key i to insert text, and then Esc key and :wq to save.

Change a server's hostname
  1. Using a text editor, open the server's /etc/sysconfig/network file. ...
  2. Modify the HOSTNAME= value to match your FQDN hostname. ...
  3. For internal networking, change the host that is associated with the main IP address for your server (found at /etc/hosts). ...
  4. Run the hostname command.

Was this answer helpful?

 Print this Article

Also Read

How to compile kernel with RocketRaid 2640 RAID Cards

1. yum install kernel update you want2. wget...

How to change cPanel password from command line?

cPanel password of a domain can be changed from command line using cPanel script. Given below are...

Fix WHM/cPanel cPHulk Brute Force Protection Lock Out Via SSH

ssh to the server and login as root then type   mkdir /home/cphulkchmod 777...

How to reboot a unix server via telnet?

Using a telnet program like http://www.telnet98.com/ or SSH Client like putty (for windows),...

How do I assign additional IP addresses in RedHat/CentOS?

If you are using CPanel, you should add the IP addresses through WHM.  Do not follow...