— Add/Rename hostname inside “/etc/hosts“
cat /etc/hosts 127.0.0.1 FlyWithEduDB2
— Add/Rename hostname inside “/etc/hostname“
cat /etc/hostname FlyWithEduDB2
— Dynamically update the hostname as well
hostname FlyWithEduDB2
— Reboot the system
sudo reboot
One thought on “Change hostname in Ubuntu”