Queries internet domain name servers interactively.
nslookup [ - option ] [ name | - ] [ server ]
The nslookup command queries internet domain name servers in two modes. Interactive mode allows you to query name servers for information about various hosts and domains, or to print a list of the hosts in a domain. In noninteractive mode, the names and requested information are printed for a specified host or domain.
nslookup -query=hinfo -timeout=10
Interactive commands
Item | Description |
---|---|
host [server] | Looks up information for the host using the current default server or using server, if specified. If the host is an Internet address and the query type is A or PTR, the nslookup command returns the name of the host. If the host is a name and does not have a trailing period, the search list is used to qualify the name. To look up a host not in the current domain, append a period to the name. |
server Domain lserver Domain | Changes the default server to the value specified by the Domain parameter. The lserver subcommand uses the initial server to look up information about the domain. The server subcommand uses the current default server. If an authoritative answer cannot be found, the names of any additional servers that might have the answer are returned. |
exit | Exits the program. |
set Keyword[=Value] | Changes state information that affects lookups. You can specify
the following keywords:
|
Item | Description |
---|---|
/etc/resolv.conf | Contains the initial domain name and nameserver addresses. |