Display the Current Hostname
To view the current hostname, enter the following command:
As you can see in the image above, the current hostname is set to ubuntu1804.localdomain.
Change the Hostname
The following steps outline how to change the hostname in Ubuntu 18.04.
1. Change the hostname using hostnamectl
In Ubuntu 18.04 we can change the system hostname and related settings using the command hostnamectl.
For example, to change the system static hostname to linuxize, you would use the following command: Continue reading “How to Change Hostname on Ubuntu 18.04” »