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: [bob@centos-s-2vcpu-blah ~]
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
159.89.111.111 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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You’re best off to run the hostname command as root (check hostname -h for full command).
Give the droplet a reboot, if the /etc/hosts still has old entries, then give it an edit.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.