1. # hostname test
2. 修改/etc/sysconfig/network中的hostname,即hostname=test
3. 修改/etc/hosts文件,根据hosts文件中已存在的添加或者修改,将原主机名修改为test或者自行添加。
1. # hostname test
2. 修改/etc/sysconfig/network中的hostname,即hostname=test
3. 修改/etc/hosts文件,根据hosts文件中已存在的添加或者修改,将原主机名修改为test或者自行添加。