How to Change Hostname on Ubuntu 20.10
Aug 19, 2021
How do you view your hostname?
Step 1 : You need to use the hostname command or hostnamectl command
hostname
Step 2 : Output from the hostname command
Setting the hostname
Step 1 :Changing the hostname is fairly simple. To do this, we can use the hostnamectl command as root or with sudo.
sudo hostnamectl set-hostname devtutorial
Step 2 : Open the /etc/hosts file and change the old hostname to the new one.
sudo nano /etc/hosts
Step 3 : Verify the change
hostname
Recommended
Apr 04, 2024
Apr 04, 2024
Apr 03, 2024
Apr 03, 2024
Apr 03, 2024
Apr 01, 2024
Apr 01, 2024
Apr 01, 2024
Apr 01, 2024
Mar 31, 2024
Mar 30, 2024
Mar 30, 2024
Mar 30, 2024