Changing hostname in Ubuntu 18.04.2 LTS is different from previous versions. You can use following command
1 |
sudo hostnamectl set-hostname techat.net |
After this you need to set preserve hostname setting in /etc/cloud/cloud.cfg
From
1 |
preserve_hostname: false |
TO
1 |
preserve_hostname: true |
This will preserve new hostname after reboot.
Comment Policy:
Your words are your own, so be nice and helpful if you can. Please, only use your real name, not your business name or keywords. Using business name or keywords instead of your real name will lead to the comment being deleted. Anonymous commenting is not allowed either. Limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.