# 查看目前的主機名稱 # 
hostnamectl

# 設定主機名稱 #
hostnamectl  set-hostname   [主機名稱]

另外針對主機名稱多了「icon-name」、「chassis」 

set-icon-name [NAME]
Set the system icon name. The icon name is used by some graphical applications to visualize this host. The icon
name should follow the Icon Naming Specification[1]. Pass an empty string to this operation to reset the icon name
to the default value, which is determined from chassis type (see below) and possibly other parameters.

set-chassis [TYPE]
Set the chassis type. The chassis type is used by some graphical applications to visualize the host or alter user
interaction. Currently, the following chassis types are defined: “desktop”, “laptop”, “server”, “tablet”,
“handset”, as well as the special chassis types “vm” and “container” for virtualized systems that lack an
immediate physical chassis. Pass an empty string to this operation to reset the chassis type to the default value
which is determined from the firmware and possibly other parameters.

最後修改日期: 2019-02-04

作者

留言

撰寫回覆或留言