How Nslookup Functions in Linux, Windows, and macOS

To use nslookup on Mac, Windows, or Linux computers, the first step is to open the command-line of the operating system in question. After that, there are two previously introduced modes to mobilize the DNS tool for your purposes:

  1. Interactive mode: start nslookup with the command of the same name and subsequently add the parameters separately.
  2. Noninteractive mode: directly enter the nslookup command as well as the desired parameters

The most appropriate approach depends on your available know-how. If you are familiar with the necessary parameters, there is nothing stopping you from carrying out the desired DNS server query in a single step (as long as the DNS server doesn’t need to be switched).

Beginners who first need to get to know the service can ease the transition by starting nslookup and then learning about syntax and parameters step by step. You can always use retrieving available options with the “help” command is possible and very helpful in the interactive mode.

To close nslookup after the query, simply give the “exit” command, or close the command-line. Alternatively, the [CTRL] + [C] key combination does the trick it might directly close your terminal.

If you have begun by starting nslookup in a single step, the command-line will wait for the entry of further commands. Now, users have the opportunity to complete queries with the standard setup or to determine individualized options. For the former method, simply enter the domain name for which you want to find out the IP address (or vice versa) into the command-line and confirm your choice by pressing the enter key. nslookup, for example, presents the following result in the search for the address to the domain:

In this case, a “non-authoritative answer” notification is given, as the local DNS server was unable to answer the query itself, and instead had to contact one or more other name servers. The content of the nslookup results are the IPv4 and IPv6 addresses (longer, divided with colons) of the example domain.

DNS server query in a browser with nslookup online tools

Conducting DNS server queries with nslookup doesn’t necessarily require the tool to be run on your own system. The web features various applications that provide these resources. In this case, the IP address (or rather, domain name) then occurs on a different computer – guided by your own browser. Two nslookup examples of such web applications are and limits itself to the basic function of nslookup. After entering an IP address or a host name, the tool offers up the corresponding counterpart: