Este conteúdo não está disponível no idioma selecionado.
6.4. Configuring Host Names Using nmcli
The NetworkManager tool nmcli can be used to query and set the static host name in the
/etc/hostname
file.
To query the static host name, issue the following command:
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
To set the static host name to my-server, issue the following command as
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
nmcli general hostname
~]$ nmcli general hostname
root
:
nmcli general hostname my-server
~]# nmcli general hostname my-server