status 显示当前主机名设置 set-hostname NAME 设置系统主机名 set-icon-name NAME 为主机设置icon名 set-chassis NAME 设置主机平台类型名12345678910111213141516 静态的(static)、瞬态的(transient)、和灵活的(pretty)。 静态主机名也称为内核主机名,是系统在启动时从/etc/hostname内自动初始化的主机名。 瞬态主机...
命令格式:hostname newhostname [root@localhost ~]# hostname dmdsc02[root@localhost ~]# [root@localhost ~]# logoutConnection closed by foreign host.Connecting to 192.168.26.112:22...Connection established.To escape to local shell, press 'Ctrl+Alt+]'.Activate the web console with: syst...
--pretty Only set pretty hostname Commands: status Show current hostname settings set-hostname NAME Set system hostname set-icon-name NAME Set icon name for host set-chassis NAME Set chassis type for host set-deployment NAME Set deployment environment for host set-location NAME Set location fo...
[root@localhost ~]# hostnamectl set-hostname test-vm-1 1. 再查看主机信息,第一个就是主机名 [root@localhost ~]# hostnamectl Static hostname: test-vm-1 Icon name: computer-vm Chassis: vm Machine ID: 867aaa1c353c4aad8510c0ee973bc083 Boot ID: 6f9f8d5dd4f7426daff92ee2e0b736cf Virtual...
hostnamectl may be used to query and change the system hostname and related settings. This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special c
-M --machine=CONTAINER Operate on local container --transient Only set transient hostname --static Only set static hostname --pretty Only set pretty hostname Commands: status Show current hostname settings set-hostname NAME Set system hostname ...
-M --machine=CONTAINER Operate on local container --transient Only set transient hostname --static Only set static hostname --pretty Only set pretty hostname Commands: status Show current hostname settings set-hostname NAME Set system hostname ...
Set the hostname of the computer: sudo hostnamectl set-hostname "hostname" Set a pretty hostname for the computer: sudo hostnamectl set-hostname --static "hostname.example.com" && sudo hostnamectl set-hostname --pretty "hostname" Reset hostname to its default value: sudo hostnamectl...
-M --machine=CONTAINER Operate on local container --transient Only set transient hostname --static Only set static hostname --pretty Only set pretty hostname Commands: status Show current hostname settings set-hostname NAME Set system hostname ...
hostnamectl may be used to query and change the system hostname and related settings. This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special c