Commands may be interrupted at any time by typing a control-C.
To exit, type a control-D
Dv EOF
or type
exit .
The command line length must be less than 256 characters.
To treat a built-in command as a host name,
precede it with an escape character
.&\\ .
N.B.: An unrecognized command will be interpreted as a host name.
-tag -width "lserver"
Ar host Op Ar 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, the default
domain name is appended to the name. (This behavior depends on the state of the
set
options
domain , srchlist , defname ,
and
search . )
To look up a host not in the current domain, append a period to
the name.
server Ar domain
lserver Ar domain
Change the default server to
domain ;
lserver
uses the initial server to look up information about
domain ,
while
server
uses the current default server.
If an authoritative answer can't be found, the names of servers
that might have the answer are returned.
root
Changes the default server to the server for the root of the domain name space.
Currently, the host
ns.internic.net
is used.
(This command is a synonym for
Ic lserver ns.internic.net . )
The name of the root server can be changed with the
Ic set root
command.
Xo Ic finger Op Ar name
Ic > Ar filename
Xo Ic finger Op Ar name
Ic >> Ar filename
Connects with the finger server on the current host.
The current host is defined when a previous lookup for a host
was successful and returned address information (see the
Ic set querytype=A
command).
The
name
is optional.
>
and
>>
can be used to redirect output in the usual manner.
Xo Ic ls Op Ar option
domain Op Ic > Ar filename
Xo Ic ls Op Ar option
domain Op Ic >> Ar filename
List the information available for
domain ,
optionally creating or appending to
filename .
The default output contains host names and their Internet addresses.
Option
can be one of the following:
-tag -width "-a "
Fl t Ar querytype
lists all records of the specified type (see
querytype
below).
Fl a
lists aliases of hosts in the domain;
synonym for
Fl t Dv CNAME .
Fl d
lists all records for the domain;
synonym for
Fl t Dv ANY .
Fl h
lists CPU and operating system information for the domain;
synonym for
Fl t Dv HINFO .
Fl s
lists well-known services of hosts in the domain;
synonym for
Fl t Dv WKS .
When output is directed to a file, hash marks are printed for every
50 records received from the server.
view Ar filename
Sorts and lists the output of previous
ls
command(s) with
more 1 .
help
?
Prints a brief summary of commands.
exit
Exits the program.
Xo Ic set Ar keyword
Op = Ns Ar value
This command is used to change state information that affects the lookups.
Valid keywords are:
-tag -width "class=v"
all
Prints the current values of the frequently-used options to
set .
Information about the current default server and host is also printed.
class= Ns Ar value
Change the query class to one of:
-tag -width "HESIOD "
Dv IN
the Internet class
Dv CHAOS
the Chaos class
Dv HESIOD
the MIT Athena Hesiod class
Dv ANY
wildcard (any of the above)
The class specifies the protocol group of the information.
(Default =
IN ;
abbreviation =
cl )
Xo Op Ic no
Ic debug
Turn debugging mode on. A lot more information is printed about the
packet sent to the server and the resulting answer.
(Default =
nodebug ;
abbreviation =
Op Ic no
Ic deb )
Xo Op Ic no
Ic d2
Turn exhaustive debugging mode on.
Essentially all fields of every packet are printed.
(Default =
nod2 )
domain= Ns Ar name
Change the default domain name to
name .
The default domain name is appended to a lookup request depending on the
state of the
defname
and
search
options.
The domain search list contains the parents of the default domain if it has
at least two components in its name.
For example, if the default domain
is CC.Berkeley.EDU, the search list is CC.Berkeley.EDU and Berkeley.EDU.
Use the
Ic set srchlist
command to specify a different list.
Use the
Ic set all
command to display the list.
(Default = value from
hostname 1 ,
/etc/resolv.conf ,
or
LOCALDOMAIN;
abbreviation =
do )
srchlist= Ns Ar name1/name2/...
Change the default domain name to
name1
and the domain search list
to
name1 , name2 ,
etc. A maximum of 6 names separated by slashes (/)
can be specified.
For example,
-literal -offset indent
set srchlist=lcs.MIT.EDU/ai.MIT.EDU/MIT.EDU
sets the domain to lcs.MIT.EDU and the search list to the three names.
This command overrides the
default domain name and search list of the
Ic set domain
command.
Use the
Ic set all
command to display the list.
(Default = value based on
hostname 1 ,
/etc/resolv.conf ,
or
LOCALDOMAIN;
abbreviation =
srchl )
Xo Op Ic no
Ic defname
If set, append the default domain name to a single-component lookup request
(i.e., one that does not contain a period).
(Default =
defname ;
abbreviation =
Op Ic no
Ic defname )
Xo Op Ic no
Ic search
If the lookup request contains at least one period but
doesn't
end with a trailing period, append the domain names in the domain search list
to the request until an answer is received.
(Default =
search ;
abbreviation =
Op Ic no
Ic sea )
port= Ns Ar value
Change the default TCP/UDP name server port to
value .
(Default = 53;
abbreviation =
po )
querytype= Ns Ar value
type= Ns Ar value
Change the type of information query to one of:
-tag -width "HINFO "
Dv A
the host's Internet address.
Dv CNAME
the canonical name for an alias.
Dv HINFO
the host CPU and operating system type.
Dv MINFO
the mailbox or mail list information.
Dv MX
the mail exchanger.
Dv NS
the name server for the named zone.
Dv PTR
the host name if the query is an Internet address;
otherwise, the pointer to other information.
Dv SOA
the domain's
start-of-authority
information.
Dv TXT
the text information.
Dv UINFO
the user information.
Dv WKS
the supported well-known services.
Other types
Dv ANY, AXFR, MB, MD, MF, NULL
are described in the RFC-1035 document.
(Default =
A ;
abbreviations =
q , ty )
Xo Op Ic no
Ic recurse
Tell the name server to query other servers if it does not have the
information.
(Default =
recurse ;
abbreviation =
Op Ic no
Ic rec )
retry= Ns Ar number
Set the number of retries to
number .
When a reply to a request is not received within a certain
amount of time (changed with
Ic set timeout ) ,
the timeout period is doubled and the request is resent.
The retry value controls how many times a request is resent before giving up.
(Default = 4, abbreviation =
ret )
root= Ns Ar host
Change the name of the root server to
host .
This affects the
Ic root
command.
(Default =
ns.internic.net. ;
abbreviation =
ro )
timeout= Ns Ar number
Change the initial timeout interval for waiting for a reply to
number
seconds. Each retry doubles the timeout period.
(Default = 5 seconds; abbreviation =
ti )
Xo Op Ic no
Ic vc
Always use a virtual circuit when sending requests to the server.
(Default =
novc ;
abbreviation =
Op Ic no
Ic v )
Xo Op Ic no
Ic ignoretc
Ignore packet truncation errors.
(Default =
noignoretc ;
abbreviation =
Op Ic no
Ic ig )