Let’s start our tutorial on nslookup by looking at how to start it and how to exit from it. You can run nslookup either interactively or noninteractively. If you want to look up only one piece of data, you should use the noninteractive form. If you plan on doing something more extensive, such as changing servers or options, use an interactive session.
To start an interactive session, just type nslookup:
nslookupDefault Server: terminator.movie.edu Address: 22.214.171.124 >
If you need help, type ? or help.
When you want to exit, type ^Z (Ctrl-Z) and press Enter. You can also exit from nslookup with ^C or ^Break (Ctrl-Break). This behavior is different from nslookup’s operation on a Unix host, where if you send nslookup an interrupt, it catches it, stops whatever it is doing (like a zone transfer), and gives you the > prompt. There’s no way to just interrupt Microsoft’s nslookup: you just have to stop nslookup completely and restart it.
For a noninteractive lookup, include the name you are looking up on the command line:
nslookup carrieServer: terminator.movie.edu Address: 126.96.36.199 Name: carrie.movie.edu Address: 188.8.131.52