首页 > 代码库 > 修改Centos7/RHEL7的主机名

修改Centos7/RHEL7的主机名

Centos7修改主机名与Centos6不一样

使用命令

# hostnamectl set-hostname  ipa7.example.com

 

文件为 /etc/hostname cat /etc/hostname  ipa7.example.com

 

查询主机名

# hostname

ipa7.example.com

修改Centos7/RHEL7的主机名