Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/help/en/bash/nslookup.html
blob: c7db81ef7972e76c346d41eef931307ef24f50e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<link rel="STYLESHEET" href="../term_tools/main.css" type="text/css">
<title>nslookup MAN Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body><!-- #BeginLibraryItem "/Library/head_bash.lbi" --><div id="nav-menu">
<ul>
<li><a class="rl" href="../term_tools/index.html"><img src="../term_tools/images/ss64.gif" title="Home" alt="Home"></a></li>
<li><a class="rl" href="../term_tools/bash"><img src="../term_tools/images/bash-l.gif" title="bash" alt="bash"></a></li>
<li><!-- Search Google -->
<form action="http://www.google.com/search" method="get" style="margin:0px;padding:0px;">
<div align="right">
<input name="q" type="text" class="body" size="25">
<input class="submit" type="submit" value="Search">
<input type="hidden" name="q" value="site:ss64.com/bash/">
</div>
</form></li>
<li><a class="rr" href="syntax.html"><img src="../term_tools/images/syntax-r.gif" title="Bash Syntax"></a></li>
</ul>
</div> <!-- #EndLibraryItem --><h1>nslookup</h1> 
<p>Query Internet name servers </p>
<pre>Syntax:
       nslookup

       nslookup <i>host-to-find</i> 

       nslookup <i>server</i> 

interactive mode:

       nslookup -<i>server</i> 

       nslookup [-<i>options</i>] [<i>host-to-find</i> ]

Options:

   host [<i>server</i> ]
         Look up information for host using the current default server or using server,
         if specified. If <i>host </i>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 <i>domain
</i>   lserver <i>domain</i>
         Change the default server to <i>domain</i> ; lserver uses the initial server to look up
         information about <i>domain</i> 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
         Change 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
          `lserver ns.internic.net' The name of the root server can be changed with
         the `set root ' command. 

   finger [name ] [> filename ] 
   finger [name ] [>> 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 `set querytype=A ' command). The name is optional. > and
          >> can be used to redirect output in the usual manner.

   ls [option ] domain [> filename ]
   ls [option ] domain [>> filename ]
          List the information available for domain , optionally creating or appending
          to <i>filename</i> The default output contains host names and their Internet addresses.
          <i>Option</i> can be one of the following:

             -t <i>querytype</i>  list all records of the specified type (see querytype below). 
             -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'

          When output is directed to a file, hash marks are printed for every 50 records
          received from the server. 

   view <i>filename</i>
          Sort and lists the output of previous ls command(s) with more(1). 

   set <i>keyword</i> [= <i>value</i> ]<br>          This command is used to change state information that affects the lookups.
          run <b>man nslookup</b> for a full list of valid keywords.

   set all   Print the current value of the frequently-used options
             to set Information about the current default server and host is also printed.

   help
   ?      Print a brief summary of commands. 

   exit   Exit the program.
</pre>
<p>Nslookup has two modes: interactive and non-interactive.</p>
<p> Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. </p>
<p>Non-interactive mode is used to print just the name and requested information for a host or domain.</p>
<p>The options listed under the `set ' command  can be specified in the .nslookuprc file in the user's home directory (listed one per line). Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen. </p>
<p>  <i>&quot;He who listens to truth is not less
than he who utters truth&quot; -  Kahlil Gibran</i></p>
<p><b>Related</b>:<br>
  <a href="env.html"><br>
  </a> named(8), resolver(3), resolver(5)<br>
Equivalent Windows command: 
  <a href="../term_tools/nt/nslookup.html">NSLOOKUP</a> - Lookup IP addresses on a NameServer.</p>
<!-- #BeginLibraryItem "/Library/foot_bash.lbi" --><p align="left"><script type="text/javascript"><!--
google_ad_client = "pub-6140977852749469";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel ="1984328893";
google_color_border = "CCCCCC";
google_color_bg = "CCCCCC";
google_color_link = "000000";
google_color_text = "333333";
google_color_url = "0000FF";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br>
</p>
<div align="center"><hr size="1">
  <p id="top"><a href="#"><img src="../term_tools/images/top-4.gif" width="47" height="53" border="0" alt="Back to the Top" title="Back to the Top"></a></p>
  <p class="tagline">&copy; Copyright <a href="http://ss64.com/">SS64.com</a> 1999-2010<br>
Some rights reserved<br>
</p>
</div><!-- #EndLibraryItem --></body>
</html>