How to Change Hostname in Ubuntu 18.04 LTS Permanently?<br /><br />Method 1: By using command way:-<br /><br />Step 1: Right click on the desktop, and then click on 'Open terminal.'<br /><br />Step 2: Run the command below:- <br /><br /> sudo hostnamectl set-hostname your-new-hostname<br /><br />Step 3: Open the /etc/hosts file by command below, and then change the old hostname to the new one.<br /><br /> sudo nano /etc/hosts<br /><br />Step 4: Save the file, and exit from nano editor.<br /><br /><br />Method 2: By Using GUI way:-<br /><br />Step 1: Click on Panel at the top right.<br /><br />Step 2: Click on Settings, and then click on 'Details,' and then click on 'About.'<br /><br />Step 3: In order to change the hostname, change the device name there, and close the settings window.<br /><br />Step 4: Now, Go to terminal again, open the hosts file and change host name there also.<br /><br /><br /><br />It's done<br /><br /><br />Thanks for watching, please like and subscribe <br /><br />==============================================<br /><br />https://www.facebook.com/HowtoTutorialsByAmit/