修改Centos7/RHEL7的主机名

Centos7修改主机名与Centos6不一样

使用命令

# hostnamectl set-hostname  ipa7.example.com

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

查询主机名

# hostname

ipa7.example.com

原文地址:https://www.cnblogs.com/gdlinux/p/6789462.html