1.暂时修改主机名,重启系统后会失效
- [root@B comodo]# hostname PC_B
- [root@B comodo]# hostname
- PC_B
2.修改配置文件/etc/sysconfig/network中HOSTNAME信息,重启后生效
- [root@B comodo]# vim /etc/sysconfig/network
- NETWORKING=yes
- #HOSTNAME=localhost.localdomain
- HOSTNAME=PC_B
3.修改IP地址对应的主机名/etc/hosts
- [root@B comodo]# vim /etc/hosts
- 127.0.0.1 localhost.localdomain localhost
- ::1 localhost6.localdomain6 localhost6
- 127.0.0.1 PC_B
阅读(1481) | 评论(0) | 转发(0) |