Ubuntu – Should one use FQDN in /etc/hostname instead of hostname


As I read in man page, it is recommended to put hostname(without domain name) to /etc/hostname.
For example, host instead of host.domainsub.domaintld.
But, as I know, some software relies on having FQDN in /etc/hostname.

What should one specify in /etc/hostname on Debian/Ubuntu machines?

If not FQDN, where FQDN should be specified instead?

I know, question is a bit old, but didn't found clear answer. Some people say hostname, some – FQDN. Thanks.

Best Answer

In the /etc/hostname file you use only the hostname. The FQDN you can set on: /etc/hosts that might look like:        thishost.mydomain.org    thishost

According to manual of the hosts file.


Related Question