Name
host
Synopsis
host [options
]name
[server
]
System administration command. Print information about hosts or zones in DNS. Hosts may be IP addresses or hostnames; host converts IP addresses to hostnames by default and appends the local domain to hosts without a trailing dot. Default servers are determined in /etc/resolv.conf. For more information about hosts and zones, read Chapter 1 and Chapter 2 of Paul Albitz’s and Cricket Liu’s DNS and BIND (O’Reilly).
Options
- -a
Same as -t ANY.
- -c class
Search for specified resource record class (IN, CH, CHAOS, HS, HESIOD, or ANY). Default is IN.
- -d
Verbose output. Same as -v.
- -l
List mode. This also performs a zone transfer for the named zone. Same as -t AXFR.
- -n
Perform reverse lookups for IPv6 addresses using IP6.INT domain and “nibble” labels instead of IP6.ARPA and binary labels.
- -r
Do not ask contacted server to query other servers, but require only the information that it has cached.
- -s
Stop querying nameservers upon receiving a SERVFAIL response.
- -t type
Look for type entries in the resource record. type may be any recognized query type, such as A, AXFR, CNAME, NS, SOA, SIG, or ANY. If name is a hostname, host will look for A records by default. If name is an IPv4 or IPv6 address, it will look for PTR records.
- -v
Verbose. Include all fields from resource record, even time-to-live and class, as well as “additional information” and “authoritative nameservers” (provided by the remote nameserver).
- -w
Never give up on queried server.
- -C
Display SOA records from ...
Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.