centOS6 host name change

[root@localhost ~]# vim /etc/sysconfig/network
改hostname
[root@localhost ~]# vim /etc/hosts

The first host 127.0.0.1 behind the first line of the name of local ****. Local ***** (I do not remember ... probably the case [Behind his]) deleted and replaced you want to set the hostname ~
[root @ localhost ~] # reboot

success

Guess you like

Origin blog.csdn.net/helloworld0906/article/details/89963600