host is a simple tool used to perform DNS lookups in Linux. It is usually used to resolve a hostname into an IP address or vice-versa.
If no arguments or options are given, host prints a short summary of its command line arguments and options:
To find out the IP address of linux-bible.com, type host linux-bible.com:
To find out the hostname of the host with the IP address of 220.127.116.11, use the following command:
To print the SOA record information, use the -C option. A SOA (Start of Authority) record contains basic properties of the domain and the zone that the domain is in.
To make a query of type ANY for google.com, use the -a option:
To specify the DNS query type, use the -t option, followed by the type. For example, to print name servers for google.com, use the -t ns option:
To print the TXT record (human readable information about a server) for google.com, use the -t TXT option: