host — query a proxy/content DNS server using the DNS protocol
host
[-4] [-6] [-r] [-a] [-t t
] {n
} [s
]
host looks up resource records for n
.
If s
is supplied it makes a Domain Name System request to a server at s
, otherwise it makes a Domain Name System request to the configured local proxy DNS server(s).
It prints the results in the same human-readable format as employed by dnsq(1) and dnsqr(1).
If t
is supplied, that is the type of resource record that it looks up.
t
can be numeric or symbolic, just as for dnsq(1) and dnsqr(1).
The -a option is equivalent to -t any . Note that "any" is not "all", and this is generally not useful (even before RFC8482).
If the -6 option is not used and n
is a human-readable IPv4 address, host defaults t
to "ptr" if it is not supplied and looks up the "a.b.c.d.in-addr.arpa." reverse-lookup domain corresponding to that IPv4 address.
If the -4 option is not used and n
is a human-readable IPv6 address, host defaults t
to "ptr" if it is not supplied and looks up the "a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.ip6.arpa." reverse-lookup domain corresponding to that IPv6 address.
If the -6 option is not used host feeds n
through name qualification and defaults t
to "a" if it is not supplied.
If the -4 option is not used host feeds n
through name qualification and defaults t
to "aaaa" if it is not supplied.
The -6 and -4 options are mutually exclusive.
The -r option causes the lookup to use a non-recursive query.
Note that this usually will not work if s
is not supplied and host is thus defaulting to the configured local proxy DNS server(s), or s
denotes proxy DNS servers.
host has no "debug" mode, and its output is already verbose. It does not support non-Internet class queries, performing zone transfers (for which axfr-get(1) is the proper tool), or variations from the normal UDP/TCP timeout and fallback mechanisms. It only employs one query type for any given invocation.