hostnamectl set-hostname foo
foo is what you want to change the hostname
shown in the current host name hbza, we changed tianzhankui-hbza
figure su - re-log in as root, the new host name is effective immediately
hostnamectl set-hostname foo
foo is what you want to change the hostname
shown in the current host name hbza, we changed tianzhankui-hbza
figure su - re-log in as root, the new host name is effective immediately