centos7修改主机名 背景:Windows 10 64位,VMware-workstation-full-15.5.2,CentOS-7-x86_64-Minimal,JDK1.8.0_212 1.查看当前主机名 hostname 2.修改主机名 hostnamectl set-hostname 主机名 3.重启 reboot 重启之后重新查看主机名: hostname