How to change Hostname in CentOS
Print
This artcle describe the way to change hostname of CentOS vertual server.
Step1. Open /etc/sysconfig/network from your favorite text editor. In this example we are using "nano" Text editor.
# nano /etc/sysconfig/network
Step2. Change HOSTNAME=server.yournewhosname.com
Eg: HOSTNAME=verygoodhn
STEP3: Run the following command
#hostname
Was this answer helpful?
« Back