To permanently change an Ubuntu 20.04 Server’s name edit the /etc/hostname file:
sudo vim /etc/hostname
This will show the current server (host) name:
Rename Ubuntu 20.04 Server:
Change the name to whatever you want to call the server:
Save the changes (esc :wq in vim).
You will see that the host still has its old name:
Reboot the server to update its name to the new name.
Now the server has its new name:
This change is now permanent.
For more Ubuntu articles as how too’s click on our Ubuntu Category.