// 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
184.108.40.206 deep.openna.com deep
220.127.116.11 mail.openna.com mail
18.104.22.168 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 22.214.171.124 is for the host deep.openna.com. Another name for deep.openna.com is deep.