0%
CentOS設定hostname
先查看CentOS上目前hostname
1 2 3 4 5 6 7 8 9 10
| $ hostnamectl Static hostname: localhost.localdomain Icon name: computer-desktop Chassis: desktop Machine ID: f08e0bfd24b54a2aa240419122e4f8be Boot ID: 8fe1951afafb40779243d362a020caab Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-957.el7.x86_64 Architecture: x86-64
|
設定hostname
1
| hostnamectl set-hostname [NAME]
|