SET NAME
When called with one argument or with the --file option, the commands set the host name or
the NIS/YP domain name. hostname uses the sethostname(2) function, while all of the three
domainname, ypdomainname and nisdomainname use setdomainname(2). Note, that this is effec‐
tive only until the next reboot. Edit /etc/hostname for permanent change. 编辑/etc/hostname即可永久修改,于是修改为
#localhost.localhostdomain
myhostname 重启后依旧不行。
按网上的说法修改/etc/sysconfig/network也是不行(http://soft.chinabyte.com/os/281/11563281.shtml)