[Level 1] Change Hostname in CentOS.
How to change hostname in CentOS.
1. Changing online server hostname.
Use command "hostname".
ex.
2. Changing hostname permanently.
a. change setting "HOSTNAME" of file /etc/sysconfig/network
ex.
b. use command "sysctl"
ex.
Wish this helps.
regards,
Stanley Huang
1. Changing online server hostname.
Use command "hostname".
ex.
# hostname my_new_hostname.my_new_domainname;
2. Changing hostname permanently.
a. change setting "HOSTNAME" of file /etc/sysconfig/network
ex.
HOSTNAME=my_new_hostname.my_new_domainname
b. use command "sysctl"
ex.
# sysctl kernel.hostname=\
my_new_hostname.my_new_domainname;
my_new_hostname.my_new_domainname;
Wish this helps.
regards,
Stanley Huang
Comments
Post a Comment