[Z]Linux下更改计算机名

1566阅读 0评论2012-04-11 静飞lv
分类:

do as the following steps:
 
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
 
====================================================================
上一篇:linux 串口开机引导
下一篇:函数pthread_cond_init()的使用方法