Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

6.3.5. 远程更改主机名

要在远程系统中执行 hostnamectl 命令,请使用 -H, --host 选项,如下所示:
~]# hostnamectl set-hostname -H [username]@hostname
其中 hostname 是您要配置的远程主机。用户名是可选的hostnamectl 工具将使用 SSH 连接到远程系统。