hostname 查看主机名 永久修改主机名的两种方式 (1)第一种方式 vi /etc/hostname 编辑hostname reboot 重启生效 (2)第二种方式 hostname set-hostname