nslookup.1 (2010 09)

n
nslookup(1) nslookup(1)
(BIND 9.3)
The following hosts name services are recognized:
dns Use the servers defined in the
/etc/resolv.conf
file.
files Use the entries in the /etc/hosts file.
nis Use the maps at the NIS server.
Note: NIS+ is not supported by
nslookup. If the
nisplus name service is included in the hosts
database, it is ignored.
If there is no
hosts database in the
/etc/nsswitch.conf
file or there is no
/etc/nsswitch.conf
file, nslookup uses this name service sequence:
dns nis files.
To override the switch policy and query DNS servers directly, you can specify a name server by entering
the server operand on the command line or by using the
server or lserver command in interactive
mode. Whenever an action is taken that causes the switch policy to be overridden, a warning message is
displayed.
If the first successful
hosts name service is
nis or files, nslookup has a reduced interactive com-
mand set; the
help command shows which commands are currently valid.
Use the
reset command in interactive mode to restore the default policy.
INTERACTIVE COMMANDS
Commands can be interrupted at any time with the
intr character, commonly Ctrl-C. To exit, type the
eof character, commonly Ctrl-D, or use the exit command. (See stty (1).) To treat a built-in command
as a host name, precede it with an escape character (\). When using NIS or the host table, only host
names and Internet addresses are allowed as commands. An unrecognized command is interpreted as a
host name.
General Commands
host [server ] Look up information for host using the current default server or using server if specified.
If host is an Internet address and the query type is
A or PTR, the name of the host is
returned. If host is a name and does not have a trailing period, one or more domains are
appended to the name. This behavior depends on the state of the set options domain,
srchlist, defname, and search; see The set Command. Answers from a name
server’s cache are labeled non-authoritative
.
? See the help command.
exit Exit the program.
finger [name][> filename]
finger [name][>> filename]
Connects with the finger server on the current host. name is a user name or user ID on
the host; it is optional. The current host is defined when a previous lookup for a host was
successful and returned address information. The output can create/overwrite (
>)or
append to (
>>) filename .
help
? Print a brief summary of commands that are valid in the current context.
ls [option] domain [> filename]
ls [option] domain [>> filename]
List information available for domain. The default output contains host names and their
Internet addresses. option can be one of the following:
-a List aliases of hosts in the domain (synonym for -t CNAME).
-d List all records for the domain (synonym for -t ANY).
-h List CPU and operating system information for the domain (synonym for
-t HINFO).
-s List well-known services of hosts in the domain (synonym for -t WKS).
-t querytype List all records of the specified type. See querytype in The set Com-
mand.
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010