Question

What is fqdn?

Posted July 6, 2013 6.5k views
I have created a droplet in centos x64 and provided a hostname as ns1 Now is ns1.mydomain.com is the fqdn? when i type the command hostname -f in ssh it shows "unknown host", then what is my fqdn? Thanks for help in advance Amit

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.

×
2 answers
You can set your droplet's FQDN by running the following commands:

nano /etc/sysconfig/network

Edit it so that it looks like this:

HOSTNAME="ns1.mydomain.com"

Edit /etc/hosts and add a line that looks like this:

127.0.0.1 ns1.mydomain.com ns1

If there's a line with both "localhost" and "ns1", delete "ns1" from that line.

Finally, reboot your droplet.
Submit an Answer