No matter your server is a testing machine or production server, it’s strongly recommended to set a fully qualified domain name (FQDN) hostname.

Enter the following command  to view the current hostname.

Fully Qualified Domain Name

On Debian/Ubuntu Linux, hostname is set in two files: /etc/hostname and /etc/hosts. Edit /etc/hostname file to change the hostname.

and write your hostname.

Now, Edit /etc/hosts file static table lookup for hostnames. Warning: Please list the FQDN hostname as first item.

and write your FQDN as follows.

At last, Verify the FQDN hostname by running the following command. If it wasn’t changed after updating above two files, please reboot server to make it work.