| 1 |
.\" Man page generated from reStructuredText |
| 2 |
.\" by the Docutils 0.22.4 manpage writer. |
| 3 |
. |
| 4 |
. |
| 5 |
.nr rst2man-indent-level 0 |
| 6 |
. |
| 7 |
.de1 rstReportMargin |
| 8 |
\\$1 \\n[an-margin] |
| 9 |
level \\n[rst2man-indent-level] |
| 10 |
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 11 |
- |
| 12 |
\\n[rst2man-indent0] |
| 13 |
\\n[rst2man-indent1] |
| 14 |
\\n[rst2man-indent2] |
| 15 |
.. |
| 16 |
.de1 INDENT |
| 17 |
.\" .rstReportMargin pre: |
| 18 |
. RS \\$1 |
| 19 |
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] |
| 20 |
. nr rst2man-indent-level +1 |
| 21 |
.\" .rstReportMargin post: |
| 22 |
.. |
| 23 |
.de UNINDENT |
| 24 |
. RE |
| 25 |
.\" indent \\n[an-margin] |
| 26 |
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 27 |
.nr rst2man-indent-level -1 |
| 28 |
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] |
| 29 |
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u |
| 30 |
.. |
| 31 |
.TH "HOST" "1" "@RELEASE_DATE@" "@PACKAGE_VERSION@" "BIND 9" |
| 32 |
.SH NAME |
| 33 |
host \- DNS lookup utility |
| 34 |
.SH SYNOPSIS |
| 35 |
.sp |
| 36 |
\fBhost\fP [\fB\-aACdlnrsTUwv\fP] [\fB\-c\fP class] [\fB\-N\fP ndots] [\fB\-p\fP port] [\fB\-R\fP number] [\fB\-t\fP type] [\fB\-W\fP wait] [\fB\-m\fP flag] [ [\fB\-4\fP] | [\fB\-6\fP] ] [\fB\-v\fP] [\fB\-V\fP] {name} [server] |
| 37 |
.SH DESCRIPTION |
| 38 |
.sp |
| 39 |
\fBhost\fP is a simple utility for performing DNS lookups. It is normally |
| 40 |
used to convert names to IP addresses and vice versa. When no arguments |
| 41 |
or options are given, \fBhost\fP prints a short summary of its |
| 42 |
command\-line arguments and options. |
| 43 |
.sp |
| 44 |
\fBname\fP is the domain name that is to be looked up. It can also be a |
| 45 |
dotted\-decimal IPv4 address or a colon\-delimited IPv6 address, in which |
| 46 |
case \fBhost\fP by default performs a reverse lookup for that address. |
| 47 |
\fBserver\fP is an optional argument which is either the name or IP |
| 48 |
address of the name server that \fBhost\fP should query instead of the |
| 49 |
server or servers listed in \fB/etc/resolv.conf\fP\&. |
| 50 |
.SH OPTIONS |
| 51 |
.INDENT 0.0 |
| 52 |
.TP |
| 53 |
.B \-4 |
| 54 |
This option specifies that only IPv4 should be used for query transport. See also the \fB\-6\fP option. |
| 55 |
.UNINDENT |
| 56 |
.INDENT 0.0 |
| 57 |
.TP |
| 58 |
.B \-6 |
| 59 |
This option specifies that only IPv6 should be used for query transport. See also the \fB\-4\fP option. |
| 60 |
.UNINDENT |
| 61 |
.INDENT 0.0 |
| 62 |
.TP |
| 63 |
.B \-a |
| 64 |
The \fB\-a\fP (\(dqall\(dq) option is normally equivalent to \fB\-v\fP \fB\-t ANY\fP\&. It |
| 65 |
also affects the behavior of the \fB\-l\fP list zone option. |
| 66 |
.UNINDENT |
| 67 |
.INDENT 0.0 |
| 68 |
.TP |
| 69 |
.B \-A |
| 70 |
The \fB\-A\fP (\(dqalmost all\(dq) option is equivalent to \fB\-a\fP, except that RRSIG, |
| 71 |
NSEC, and NSEC3 records are omitted from the output. |
| 72 |
.UNINDENT |
| 73 |
.INDENT 0.0 |
| 74 |
.TP |
| 75 |
.B \-c class |
| 76 |
This option specifies the query class, which can be used to lookup HS (Hesiod) or CH (Chaosnet) |
| 77 |
class resource records. The default class is IN (Internet). |
| 78 |
.UNINDENT |
| 79 |
.INDENT 0.0 |
| 80 |
.TP |
| 81 |
.B \-C |
| 82 |
This option indicates that \fBnamed\fP \%<#\:std-iscman-named> should check consistency, meaning that \fBhost\fP queries the SOA records for zone |
| 83 |
\fBname\fP from all the listed authoritative name servers for that |
| 84 |
zone. The list of name servers is defined by the NS records that are |
| 85 |
found for the zone. |
| 86 |
.UNINDENT |
| 87 |
.INDENT 0.0 |
| 88 |
.TP |
| 89 |
.B \-d |
| 90 |
This option prints debugging traces, and is equivalent to the \fB\-v\fP verbose option. |
| 91 |
.UNINDENT |
| 92 |
.INDENT 0.0 |
| 93 |
.TP |
| 94 |
.B \-l |
| 95 |
This option tells \fBnamed\fP \%<#\:std-iscman-named> to list the zone, meaning the \fBhost\fP command performs a zone transfer of zone |
| 96 |
\fBname\fP and prints out the NS, PTR, and address records (A/AAAA). |
| 97 |
.sp |
| 98 |
Together, the \fB\-l\fP \fB\-a\fP options print all records in the zone. |
| 99 |
.UNINDENT |
| 100 |
.INDENT 0.0 |
| 101 |
.TP |
| 102 |
.B \-N ndots |
| 103 |
This option specifies the number of dots (\fBndots\fP) that have to be in \fBname\fP for it to be |
| 104 |
considered absolute. The default value is that defined using the |
| 105 |
\fBndots\fP statement in \fB/etc/resolv.conf\fP, or 1 if no \fBndots\fP statement |
| 106 |
is present. Names with fewer dots are interpreted as relative names, |
| 107 |
and are searched for in the domains listed in the \fBsearch\fP or |
| 108 |
\fBdomain\fP directive in \fB/etc/resolv.conf\fP\&. |
| 109 |
.UNINDENT |
| 110 |
.INDENT 0.0 |
| 111 |
.TP |
| 112 |
.B \-p port |
| 113 |
This option specifies the port to query on the server. The default is 53. |
| 114 |
.UNINDENT |
| 115 |
.INDENT 0.0 |
| 116 |
.TP |
| 117 |
.B \-r |
| 118 |
This option specifies a non\-recursive query; setting this option clears the RD (recursion |
| 119 |
desired) bit in the query. This means that the name server |
| 120 |
receiving the query does not attempt to resolve \fBname\fP\&. The \fB\-r\fP |
| 121 |
option enables \fBhost\fP to mimic the behavior of a name server by |
| 122 |
making non\-recursive queries, and expecting to receive answers to |
| 123 |
those queries that can be referrals to other name servers. |
| 124 |
.UNINDENT |
| 125 |
.INDENT 0.0 |
| 126 |
.TP |
| 127 |
.B \-R number |
| 128 |
This option specifies the number of retries for UDP queries. If \fBnumber\fP is negative or zero, |
| 129 |
the number of retries is silently set to 1. The default value is 1, or |
| 130 |
the value of the \fBattempts\fP option in \fB/etc/resolv.conf\fP, if set. |
| 131 |
.UNINDENT |
| 132 |
.INDENT 0.0 |
| 133 |
.TP |
| 134 |
.B \-s |
| 135 |
This option tells \fBnamed\fP \%<#\:std-iscman-named> \fInot\fP to send the query to the next nameserver if any server responds |
| 136 |
with a SERVFAIL response, which is the reverse of normal stub |
| 137 |
resolver behavior. |
| 138 |
.UNINDENT |
| 139 |
.INDENT 0.0 |
| 140 |
.TP |
| 141 |
.B \-t type |
| 142 |
This option specifies the query type. The \fBtype\fP argument can be any recognized query type: |
| 143 |
CNAME, NS, SOA, TXT, DNSKEY, AXFR, etc. |
| 144 |
.sp |
| 145 |
When no query type is specified, \fBhost\fP automatically selects an |
| 146 |
appropriate query type. By default, it looks for A, AAAA, MX, and HTTPS |
| 147 |
records. If the \fB\-C\fP option is given, queries are made for SOA |
| 148 |
records. If \fBname\fP is a dotted\-decimal IPv4 address or |
| 149 |
colon\-delimited IPv6 address, \fBhost\fP queries for PTR records. |
| 150 |
.sp |
| 151 |
If a query type of IXFR is chosen, the starting serial number can be |
| 152 |
specified by appending an equals sign (=), followed by the starting serial |
| 153 |
number, e.g., \fB\-t IXFR=12345678\fP\&. |
| 154 |
.UNINDENT |
| 155 |
.INDENT 0.0 |
| 156 |
.TP |
| 157 |
.B \-T, \-U |
| 158 |
This option specifies TCP or UDP. By default, \fBhost\fP uses UDP when making queries; the |
| 159 |
\fB\-T\fP option makes it use a TCP connection when querying the name |
| 160 |
server. TCP is automatically selected for queries that require |
| 161 |
it, such as zone transfer (AXFR) requests. Type \fBANY\fP queries default |
| 162 |
to TCP, but can be forced to use UDP initially via \fB\-U\fP\&. |
| 163 |
.UNINDENT |
| 164 |
.INDENT 0.0 |
| 165 |
.TP |
| 166 |
.B \-m flag |
| 167 |
This option sets memory usage debugging: the flag can be \fBrecord\fP, \fBusage\fP, or |
| 168 |
\fBtrace\fP\&. The \fB\-m\fP option can be specified more than once to set |
| 169 |
multiple flags. |
| 170 |
.UNINDENT |
| 171 |
.INDENT 0.0 |
| 172 |
.TP |
| 173 |
.B \-v |
| 174 |
This option sets verbose output, and is equivalent to the \fB\-d\fP debug option. Verbose output |
| 175 |
can also be enabled by setting the \fBdebug\fP option in |
| 176 |
\fB/etc/resolv.conf\fP\&. |
| 177 |
.UNINDENT |
| 178 |
.INDENT 0.0 |
| 179 |
.TP |
| 180 |
.B \-V |
| 181 |
This option prints the version number and exits. |
| 182 |
.UNINDENT |
| 183 |
.INDENT 0.0 |
| 184 |
.TP |
| 185 |
.B \-w |
| 186 |
This option sets \(dqwait forever\(dq: the query timeout is set to the maximum possible. See |
| 187 |
also the \fB\-W\fP option. |
| 188 |
.UNINDENT |
| 189 |
.INDENT 0.0 |
| 190 |
.TP |
| 191 |
.B \-W wait |
| 192 |
This options sets the length of the wait timeout, indicating that \fBnamed\fP \%<#\:std-iscman-named> should wait for up to \fBwait\fP seconds for a reply. If \fBwait\fP is |
| 193 |
less than 1, the wait interval is set to 1 second. |
| 194 |
.sp |
| 195 |
By default, \fBhost\fP waits for 5 seconds for UDP responses and 10 |
| 196 |
seconds for TCP connections. These defaults can be overridden by the |
| 197 |
\fBtimeout\fP option in \fB/etc/resolv.conf\fP\&. |
| 198 |
.sp |
| 199 |
See also the \fB\-w\fP option. |
| 200 |
.UNINDENT |
| 201 |
.SH IDN SUPPORT |
| 202 |
.sp |
| 203 |
If \fBhost\fP has been built with IDN (internationalized domain name) |
| 204 |
support, it can accept and display non\-ASCII domain names. \fBhost\fP |
| 205 |
appropriately converts character encoding of a domain name before sending |
| 206 |
a request to a DNS server or displaying a reply from the server. |
| 207 |
To turn off IDN support, define the \fBIDN_DISABLE\fP |
| 208 |
environment variable. IDN support is disabled if the variable is set |
| 209 |
when \fBhost\fP runs. |
| 210 |
.SH FILES |
| 211 |
.sp |
| 212 |
\fB/etc/resolv.conf\fP |
| 213 |
.SH SEE ALSO |
| 214 |
.sp |
| 215 |
\fBdig(1)\fP \%<#\:std-iscman-dig>, \fBnamed(8)\fP \%<#\:std-iscman-named>\&. |
| 216 |
.SH Author |
| 217 |
Internet Systems Consortium |
| 218 |
.SH Copyright |
| 219 |
2026, Internet Systems Consortium |
| 220 |
.\" End of generated man page. |