How permanently change hostname in Linux?
Answer
Ubuntu 18.04 LTS change hostname permanently
Answer
Ubuntu 18.04 LTS change hostname permanently
- Type the hostnamectl command : sudo hostnamectl set-hostname newNameHere. Delete the old name and setup new name.
- Next Edit the /etc/hosts file: sudo nano /etc/hosts. …
- Reboot the system to changes take effect: sudo reboot.