1. 在終端輸入如下指令
hostnamectl set-hostname xxx
,xxx:你想設定的名稱。
2. 重新開機
reboot
3. 檢視是否修改成功
hostnamectl
hostnamectl set-hostname xxx
,xxx:你想設定的名稱。
reboot
hostnamectl