您的位置:首页 > 其它

责任链模式

2012-06-19 21:53 169 查看
如何修改linux计算机名



1)open a shell, tpye the command below:

[root@kcn-110]#hostname kcn-110mw

2)edit the file:/etc/sysconfig/network, change the value of 'HOSTNAME':

[root@kcn-110]#vi /etc/sysconfig/network

=======================================================================

NETWORKING=yes
HOSTNAME=kcn-110mw

=======================================================================


3)edit the file:/etc/hosts, change the ip address and your hostname


[root@kcn-110]#vi /etc/hosts

====================================================================

# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
192.168.0.110 kcn-110mw kcn-110mw

====================================================================



4)reboot network


/etc/sysconfig/network文件
改了以后要重启网络
/etc/init.d/network restart
service network restart
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: