Follow the following post to change hostname:
https://linuxize.com/post/how-to-change-hostname-on-ubuntu-18-04/
1. sudo hostnamectl set-hostname [new hostname]
2. nano /etc/hosts
3. ls -l /etc/cloud/cloud.cfg
If there is a cloud.cfg file, edit the following to "true"
4. # This will cause the set+update hostname module to not operate (if true)
preserve_hostname: true
https://linuxize.com/post/how-to-change-hostname-on-ubuntu-18-04/
1. sudo hostnamectl set-hostname [new hostname]
2. nano /etc/hosts
3. ls -l /etc/cloud/cloud.cfg
If there is a cloud.cfg file, edit the following to "true"
4. # This will cause the set+update hostname module to not operate (if true)
preserve_hostname: true
This works on Ubuntu 20.04LTS as well.
ReplyDelete