How to Change Linux Server Hostname

Centos7: Please run the command "hostnamectl set-hostname your new hostname" on your server directly.

Ubuntu/Debian: Please run "sudo -i" to get root permission first, and then run the command "hostnamectl set-hostname your new hostname" on your server to change the hostname.

Still stuck? Talk to our team.

Support is available 24/7 and usually replies within minutes.