Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
 
PREVIOUS NEXT
Tagged: #change #hostname #ubuntu
ADD COMMENT
Topic
Name
6+1 =