Back Ground Image

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.

Command Line Interface of Linux