How to permanently change ubuntu server hostname
The hostname is being reset by cloud-init
, to So we can permanently change hostname by following steps -
1. edit /etc/cloud/cloud.cfg and change preserve_hostname: false to
preserve_hostname: true
Save and exit.
2. edit /etc/hostname and replace your new name in this file
save and reboot.
Be the first person to like this
Like
comment's
(0)