当前位置: > CentOS > CentOS教程 >

Centos 7 修改hostname的方法

时间:2014-12-09 00:39来源:linux.it.net.cn 作者:IT
 
运维网监控[root@it ~]# hostname
localhost.localdomain
 
[root@it ~]# hostnamectl status
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ce981d9b614f4041adbe2a86f6f2c440
           Boot ID: 3ae5fce736ea47d9b9e1d9048cca9d7d
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-123.el7.x86_64
      Architecture: x86_64
    
[root@it ~]# hostnamectl set-hostname MonDeoLove.www.it.net.cn
 
    
[root@it ~]# hostnamectl status
   Static hostname: mondeolove.www.it.net.cn
   Pretty hostname: MonDeoLove.www.it.net.cn
         Icon name: computer-vm
           Chassis: vm
        Machine ID: ce981d9b614f4041adbe2a86f6f2c440
           Boot ID: 3ae5fce736ea47d9b9e1d9048cca9d7d
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-123.el7.x86_64
      Architecture: x86_64
    
[root@it ~]# hostname
mondeolove.www.it.net.cn
(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容