Answers for "change hostname ubuntu 20.04"

4

rename computer ubuntu 20.04

#1- Delete the old name and setup new name
sudo hostnamectl set-hostname newHostname

#2- Edit the /etc/hosts file:
sudo nano /etc/hosts

#3- Reboot the system 
sudo reboot

#4- To check the new hostname
hostnamectl
Posted by: Guest on December-31-2020
1

change hostname ubuntu 20.04

#Change hostname
sudo hostnamectl set-hostname newHostName 
#Edit the /etc/hosts file, and replace existing hostname with a new hostname.
sudo nano /etc/hosts
#Reboot the system to changes take effect
sudo reboot
Posted by: Guest on February-28-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language