CentOS 7 修改主機名稱

4 二月

# 查看目前的主機名稱 # 
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.

發表迴響

你的電子郵件位址並不會被公開。 必要欄位標記為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步瞭解 Akismet 如何處理網站訪客的留言資料