How to change hostname on Ubuntu 18.04
$ sudo hostnamectl set-hostname <newname>
Change "preserve_hostname:" false to true on /etc/cloud/cloud.cfg
$ sudo vi /etc/cloud/cloud.cfg
Add newname to /etc/hosts
$ sudo vi /etc/hosts
127.0.0.1 <newname>
$ sudo reboot
Comentários
Postar um comentário