host-name getting reset after a reboot

Problem:

The newly set hostname reverts back to older one after reboot

Reason :

Hostname is reset by cloud-init

Solution :

Inactivate cloud-init.

On terminal, key in –

[bash] hostnamectl set-hostname YourNewHostName sudo touch /etc/cloud/cloud-init.disabled sudo reboot [/bash]

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *