In Linux, I can change the hostname as follows:
sudo hostname <hostname>
Additionally, I can just change the hostname in the /etc/hostname
and /etc/hosts
file.
My question is: If I change the hostname in the files, do I still need to call sudo hostname <hostname>
or not? What does this command do in addition to change the hostname in the /etc/hostname
file?