When there is no FQDN explicitly specified on an Ubuntu server:
$ cat /etc/hostname
banana
$ cat /etc/hosts
127.0.0.1 localhost banana
Then where does mydomain.com come from?
$ hostname -A
banana.mydomain.com
Does this have anything to do with DNS records? (They seem to have been set to Google DNS on my virtual host.)
$ cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
DNS records say as follows:
$ nslookup myip
myip.in-addr.arpa name = banana.mydomain.com
Does this mean that hostname -A falls back to DNS records?
I have dozens of hostnames associated with the server IP address through DNS. How do I decide which of the many hostnames is used as the "official" or "primary" hostname?