Reverse nslookup Command

How do I use nslookup command line administrative tool for testing and troubleshooting DNS servers including reverse lookup under UNIX or Windows operating systems? How do I look up an IP address of a domain or host on a network using nslookup command?

nslookup is a UNIX or Windows (nslookup.exe)program to query Internet domain name servers. Nslookup has two modes: interactive and non-interactive. 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. Non-interactive mode is used to print just the name and requested information for a host or domain.

UNIX Example

To find out an IP address of, enter:
$ nslookup
Sample outputs:


Non-authoritative answer:

You can run reverse ip lookup as follows:
$ nslookup
Sample outputs:


Non-authoritative answer:	name =

Authoritative answers can be found from:	nameserver =	nameserver =	internet address =	internet address =	has AAAA address 2607:f0d0:0:15:2000::1

MS-Windows Example

To perform a reverse lookup on an IP address, enter (open MS-DOS prompt by clicking on Start > Run > Type > Cmd.exe):

Server: localhost


Sample session:

Fig.01: A reverse lookup on an IP address using nslookup.exe

Fig.01: A reverse lookup on an IP address using nslookup.exe

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 8 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
8 comments… add one
  • samuel Sep 6, 2011 @ 18:12

    great information

  • dofollowchecker Feb 29, 2012 @ 22:02

    Thanks for this, it has been bugging me, now to figure out the Reverse IP lookup – IPv6.

    • Stuart Jan 24, 2014 @ 20:39

      Yes, this is the magic question, isn’t it? IPv6 reverse lookup is not working with my microsoft nslookup on a machine on a hybrid network.

      • Keilaron May 22, 2015 @ 18:34

        I’m not somewhere where I can try this, but — I’m assuming you tried using -type PTR?

  • P May 4, 2012 @ 5:13

    in the sample session the Server is Unknown I do I get that to show up?

  • Saeed Neamati Nov 19, 2012 @ 10:07

    Good and simple replacement for network-tools website. I guess nslookup should be able to solve almost all of the requirements related to DNS.

  • mohammada ali Jun 14, 2013 @ 11:31

    clearfy about foward lookup and reverse lookup zone

  • erm3nda Sep 12, 2013 @ 5:01

    Looks cool, but…

    If you`re using reverse IP you also want to show all records, not just the first one.
    You cant list all websites using lookup ip.

    It’s a problem of options set or a lack of nslookup tool?
    Can i list all websites on a ip with nslookup?


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum