centos7修改主机名
作者:
CUFFS | 来源:发表于
2017-02-22 10:21 被阅读65次
- 首先我们需要先把centos的网络配置文件,/etc/sysconfig/network 把hostname栏目修改
[root@localhost ~]# vi /etc/sysconfig/network
[root@localhost ~]# cat /etc/sysconfig/network
# Created by anaconda
HOSTNAME=hm01
vi /etc/hosts
127.0.0.1 localhost.localdomain #修改localhost.localdomain为orcl1
[root@localhost ~]# cat /etc/hostname
hm01
[root@localhost ~]# ^C
- 重启电脑
shutdown -r now 或者 reboot
[root@hm01 ~]# hostname
hm01
[root@hm01 ~]# ^C
[root@hm01 ~]#
本文标题:centos7修改主机名
本文链接:https://www.haomeiwen.com/subject/icipwttx.html
网友评论