// Do the hostname positive/negative resolution
// hostname will print the name of the system as returned by the gethostname(2) function.
// "-a", Display the alias name of the host (if used).
# hostname -a
// "-f", Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file.
# hostname -f
example /etc/hosts file:
IPAddress Hostname Alias
127.0.0.1 localhost deep.openna.com
18.104.22.168 deep.openna.com deep
22.214.171.124 mail.openna.com mail
126.96.36.199 web.openna.com web
The leftmost column is the IP address to be resolved. The next column is that host's name. Any subsequent columns are alias for that host. In the second line, for example, the IP address 188.8.131.52 is for the host deep.openna.com. Another name for deep.openna.com is deep.