Normally when we introduce the Ubuntu OS interestingly, of course the name of our hostname is ubuntu. Much of the time, we are approached to change the hostname to another name when the framework has running. This article will examine how to change the hostname on Ubuntu 18.04. Albeit this change in hostname was made on Ubuntu 18.04, the same way should be possible for different renditions of Ubuntu also.
In this post, We will change the hostname of the ubuntu linux machine.
Step 1: Check the Hostname
You need to execute the given command to get current hostname of your ubuntu machine.
Step 2: Change or Update the Hostname
Now we need to execute the following command to change or update the ubuntu machine name.
sudo hostnamectl set-hostname type_hostname_here
Step 3: Reboot Your Machine
To get changes in back-end you need to reboot your machine or you need to logout and login again in your ubuntu machine.
We have successfully change the hostname on Ubuntu 20.04 LTS.
How To Change Hostname On Ubuntu 18.04 LTS