操作系統:CentOS Linux release 7.8
任務:修改主機名為sky9899
操作步驟如下:
[root@146 ~]# hostname
*.*.*.*.adsl-pool.jx.chinaunicom.com
[root@146 ~]# hostnamectl
Static hostname: localhost.localdomain
Transient hostname:? *.*.*.*.adsl-pool.jx.chinaunicom.com
Icon name: computer-server
Chassis: server
Machine ID: 3bd1b96900b8403b8c8d3405d6ad99af
Boot ID: ba99cb9810f5449f9f7509e0c5e241e5
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1062.el7.x86_64
Architecture: x86-64
[root@146 ~]# hostname
*.*.*.*.adsl-pool.jx.chinaunicom.com
[root@146 ~]# hostnamectl --static? set-hostname? sky9899
[root@146 ~]# hostname
sky9899
標簽:146,jx,操作系統,hostname,主機名,CentOS7,adsl,root,pool
來源: https://blog.51cto.com/sky9896/2491896