| 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 "NSLOOKUP" "1" "@RELEASE_DATE@" "@PACKAGE_VERSION@" "BIND 9" |
| 32 |
.SH NAME |
| 33 |
nslookup \- query Internet name servers interactively |
| 34 |
.SH SYNOPSIS |
| 35 |
.sp |
| 36 |
\fBnslookup\fP [\-option] [name | \-] [server] |
| 37 |
.SH DESCRIPTION |
| 38 |
.sp |
| 39 |
\fBnslookup\fP is a program to query Internet domain name servers. |
| 40 |
\fBnslookup\fP has two modes: interactive and non\-interactive. Interactive |
| 41 |
mode allows the user to query name servers for information about various |
| 42 |
hosts and domains or to print a list of hosts in a domain. |
| 43 |
Non\-interactive mode prints just the name and requested |
| 44 |
information for a host or domain. |
| 45 |
.SH ARGUMENTS |
| 46 |
.sp |
| 47 |
Interactive mode is entered in the following cases: |
| 48 |
.INDENT 0.0 |
| 49 |
.IP a. 3 |
| 50 |
when no arguments are given (the default name server is used); |
| 51 |
.IP b. 3 |
| 52 |
when the first argument is a hyphen (\-) and the second argument is |
| 53 |
the host name or Internet address of a name server. |
| 54 |
.UNINDENT |
| 55 |
.sp |
| 56 |
Non\-interactive mode is used when the name or Internet address of the |
| 57 |
host to be looked up is given as the first argument. The optional second |
| 58 |
argument specifies the host name or address of a name server. |
| 59 |
.sp |
| 60 |
Options can also be specified on the command line if they precede the |
| 61 |
arguments and are prefixed with a hyphen. For example, to change the |
| 62 |
default query type to host information, with an initial timeout of 10 |
| 63 |
seconds, type: |
| 64 |
.INDENT 0.0 |
| 65 |
.INDENT 3.5 |
| 66 |
.sp |
| 67 |
.EX |
| 68 |
nslookup \-query=hinfo \-timeout=10 |
| 69 |
.EE |
| 70 |
.UNINDENT |
| 71 |
.UNINDENT |
| 72 |
.sp |
| 73 |
The \fB\-version\fP option causes \fBnslookup\fP to print the version number |
| 74 |
and immediately exit. |
| 75 |
.SH INTERACTIVE COMMANDS |
| 76 |
.INDENT 0.0 |
| 77 |
.TP |
| 78 |
.B \fBhost [server]\fP |
| 79 |
This command looks up information for \fBhost\fP \%<#\:std-iscman-host> using the current default server or |
| 80 |
using \fBserver\fP, if specified. If \fBhost\fP \%<#\:std-iscman-host> is an Internet address and the |
| 81 |
query type is A or PTR, the name of the host is returned. If \fBhost\fP \%<#\:std-iscman-host> is |
| 82 |
a name and does not have a trailing period (\fB\&.\fP), the search list is used |
| 83 |
to qualify the name. |
| 84 |
.sp |
| 85 |
To look up a host not in the current domain, append a period to the |
| 86 |
name. |
| 87 |
.TP |
| 88 |
.B \fBserver domain\fP | \fBlserver domain\fP |
| 89 |
These commands change the default server to \fBdomain\fP; \fBlserver\fP uses the initial |
| 90 |
server to look up information about \fBdomain\fP, while \fBserver\fP uses the |
| 91 |
current default server. If an authoritative answer cannot be found, |
| 92 |
the names of servers that might have the answer are returned. |
| 93 |
.TP |
| 94 |
.B \fBroot\fP |
| 95 |
This command is not implemented. |
| 96 |
.TP |
| 97 |
.B \fBfinger\fP |
| 98 |
This command is not implemented. |
| 99 |
.TP |
| 100 |
.B \fBls\fP |
| 101 |
This command is not implemented. |
| 102 |
.TP |
| 103 |
.B \fBview\fP |
| 104 |
This command is not implemented. |
| 105 |
.TP |
| 106 |
.B \fBhelp\fP |
| 107 |
This command is not implemented. |
| 108 |
.TP |
| 109 |
.B \fB?\fP |
| 110 |
This command is not implemented. |
| 111 |
.TP |
| 112 |
.B \fBexit\fP |
| 113 |
This command exits the program. |
| 114 |
.TP |
| 115 |
.B \fBset keyword[=value]\fP |
| 116 |
This command is used to change state information that affects the |
| 117 |
lookups. Valid keywords are: |
| 118 |
.INDENT 7.0 |
| 119 |
.TP |
| 120 |
.B \fBall\fP |
| 121 |
This keyword prints the current values of the frequently used options to |
| 122 |
\fBset\fP\&. Information about the current default server and host is |
| 123 |
also printed. |
| 124 |
.TP |
| 125 |
.B \fBclass=value\fP |
| 126 |
This keyword changes the query class to one of: |
| 127 |
.INDENT 7.0 |
| 128 |
.TP |
| 129 |
.B \fBIN\fP |
| 130 |
the Internet class |
| 131 |
.TP |
| 132 |
.B \fBCH\fP |
| 133 |
the Chaos class |
| 134 |
.TP |
| 135 |
.B \fBHS\fP |
| 136 |
the Hesiod class |
| 137 |
.TP |
| 138 |
.B \fBANY\fP |
| 139 |
wildcard |
| 140 |
.UNINDENT |
| 141 |
.sp |
| 142 |
The class specifies the protocol group of the information. The default |
| 143 |
is \fBIN\fP; the abbreviation for this keyword is \fBcl\fP\&. |
| 144 |
.TP |
| 145 |
.B \fBnodebug\fP |
| 146 |
This keyword turns on or off the display of the full response packet, and any |
| 147 |
intermediate response packets, when searching. The default for this keyword is |
| 148 |
\fBnodebug\fP; the abbreviation for this keyword is \fB[no]deb\fP\&. |
| 149 |
.TP |
| 150 |
.B \fBnod2\fP |
| 151 |
This keyword turns debugging mode on or off. This displays more about what |
| 152 |
nslookup is doing. The default is \fBnod2\fP\&. |
| 153 |
.TP |
| 154 |
.B \fBdomain=name\fP |
| 155 |
This keyword sets the search list to \fBname\fP\&. |
| 156 |
.TP |
| 157 |
.B \fBnosearch\fP |
| 158 |
If the lookup request contains at least one period, but does not end |
| 159 |
with a trailing period, this keyword appends the domain names in the domain |
| 160 |
search list to the request until an answer is received. The default is \fBsearch\fP\&. |
| 161 |
.TP |
| 162 |
.B \fBport=value\fP |
| 163 |
This keyword changes the default TCP/UDP name server port to \fBvalue\fP from |
| 164 |
its default, port 53. The abbreviation for this keyword is \fBpo\fP\&. |
| 165 |
.TP |
| 166 |
.B \fBquerytype=value\fP | \fBtype=value\fP |
| 167 |
This keyword changes the type of the information query to \fBvalue\fP\&. The |
| 168 |
defaults are A and then AAAA; the abbreviations for these keywords are |
| 169 |
\fBq\fP and \fBty\fP\&. |
| 170 |
.sp |
| 171 |
Please note that it is only possible to specify one query type. Only the default |
| 172 |
behavior looks up both when an alternative is not specified. |
| 173 |
.TP |
| 174 |
.B \fBnorecurse\fP |
| 175 |
This keyword tells the name server to query other servers if it does not have |
| 176 |
the information. The default is \fBrecurse\fP; the abbreviation for this |
| 177 |
keyword is \fB[no]rec\fP\&. |
| 178 |
.TP |
| 179 |
.B \fBndots=number\fP |
| 180 |
This keyword sets the number of dots (label separators) in a domain that |
| 181 |
disables searching. Absolute names always stop searching. |
| 182 |
.TP |
| 183 |
.B \fBretry=number\fP |
| 184 |
This keyword sets the number of retries to \fBnumber\fP\&. |
| 185 |
.TP |
| 186 |
.B \fBtimeout=number\fP |
| 187 |
This keyword changes the initial timeout interval to wait for a reply to |
| 188 |
\fBnumber\fP, in seconds. |
| 189 |
.TP |
| 190 |
.B \fBnovc\fP |
| 191 |
This keyword indicates that a virtual circuit should always be used when sending requests to the server. |
| 192 |
\fBnovc\fP is the default. |
| 193 |
.TP |
| 194 |
.B \fBnofail\fP |
| 195 |
This keyword tries the next nameserver if a nameserver responds with SERVFAIL or |
| 196 |
a referral (nofail), or terminates the query (fail) on such a response. The |
| 197 |
default is \fBnofail\fP\&. |
| 198 |
.UNINDENT |
| 199 |
.UNINDENT |
| 200 |
.SH RETURN VALUES |
| 201 |
.sp |
| 202 |
\fBnslookup\fP returns with an exit status of 1 if any query failed, and 0 |
| 203 |
otherwise. |
| 204 |
.SH IDN SUPPORT |
| 205 |
.sp |
| 206 |
If \fBnslookup\fP has been built with IDN (internationalized domain name) |
| 207 |
support, it can accept and display non\-ASCII domain names. \fBnslookup\fP |
| 208 |
appropriately converts character encoding of a domain name before sending |
| 209 |
a request to a DNS server or displaying a reply from the server. |
| 210 |
To turn off IDN support, define the \fBIDN_DISABLE\fP |
| 211 |
environment variable. IDN support is disabled if the variable is set |
| 212 |
when \fBnslookup\fP runs, or when the standard output is not a tty. |
| 213 |
.SH FILES |
| 214 |
.sp |
| 215 |
\fB/etc/resolv.conf\fP |
| 216 |
.SH SEE ALSO |
| 217 |
.sp |
| 218 |
\fBdig(1)\fP \%<#\:std-iscman-dig>, \fBhost(1)\fP \%<#\:std-iscman-host>, \fBnamed(8)\fP \%<#\:std-iscman-named>\&. |
| 219 |
.SH Author |
| 220 |
Internet Systems Consortium |
| 221 |
.SH Copyright |
| 222 |
2026, Internet Systems Consortium |
| 223 |
.\" End of generated man page. |