How To Change Hostname On Ubuntu 18.04 LTS - TechBeginner

Welcome to TechBeginner.in, Tech Beginner provides technical blog for Online Linux Tutorials, Ubuntu Tutorials, Redhat Tutorials and CentOS 7, Configuration of server like Web Server, Application server, Database server, Window server, networking, html, css, java script, php, wordpress, opencart, magento, joomla and etc.

How To Change Hostname On Ubuntu 18.04 LTS

Share This

 
 
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.
 
 hostname
 
 
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.
 
 sudo reboot 
 
 
 
Conclusion

We have successfully change the hostname  on Ubuntu 20.04 LTS.

No comments:

Post a Comment