如何修改linux计算机名

上一篇 / 下一篇  2008-05-28 17:16:49 / 个人分类:Linux操作系统学习

 

1. open a shell, tpye the command below:

[root@localhost]#hostname localhostmw

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

[root@localhost]#vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=localhostmw

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

[root@localhost]#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   xiaodao       xiaodao

4. 改了以后要重启网络

service network restart

 


TAG: linux 计算机 Linux操作系统学习

 

评分:0

我来说两句

Open Toolbar