/etc/hosts best practices?
I have renamed my droplet from the default centos-s-2vcpu-blah to my FQDN, and I see that the PTR record was auto-created accordingly.
I see that my bash prompt is still:
So I look in /etc/hosts and I find this (excluding commented lines and those for IPv6, and where I have changed my FQDN to example.com):
127.0.0.1 centos-s-2vcpu-blah centos-s-2vcpu-blah 127.0.0.1 localhost.localdomain localhost 127.0.0.1 localhost4.localdomain4 localhost4 220.127.116.11 www.example.com example.com
Is it recommended to edit the first line to replace centos-s-2vcpu-blah above to my FQDN?
Should I leave alone the 2nd and 3rd lines?
If I do edit the first line to my FQDN, will my bash prompt change to show my FQDN?
Or do the 127.0.0.1 entries not really matter? And I can set it to whatever I like my bash prompt to say purely for the purpose of identifying to myself which Putty window is which, if I have a Putty window open to each of my many droplets.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.