Nslookup Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora And Raspbian

Nslookup Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora And Raspbian

nslookup

Query name server(s) for various domain records.

Maintainer: Debian DNS Team



Section: net

Install nslookup

  • Debian apt-get install dnsutils Click to copy
  • Ubuntu apt-get install dnsutils Click to copy
  • Alpine OS apk add bind-tools Click to copy
  • Arch Linux pacman -S bind-tools Click to copy
  • Kali Linux apt-get install dnsutils Click to copy
  • Fedora dnf install bind-utils Click to copy
  • Raspbian apt-get install dnsutils Click to copy

Query name server(s) for various domain records.

How to use nslookup?

Below are few example commands for nslookup that you can use in the terminal.

Query your system's default name server for an IP address (A record) of the domain:
nslookup example.comClick to copy
Query a given name server for a NS record of the domain:
nslookup -type=NS example.com 8.8.8.8Click to copy
Query for a reverse lookup (PTR record) of an IP address:
nslookup -type=PTR 54.240.162.118Click to copy
Query for ANY available records using TCP protocol:
nslookup -vc -type=ANY example.com Click to copy
Query a given name server for the whole zone file (zone transfer) of the domain using TCP protocol:
nslookup -vc -type=AXFR example.com name_serverClick to copy
Query for a mail server (MX record) of the domain, showing details of the transaction:
nslookup -type=MX -debug example.comClick to copy
Query a given name server on a specific port number for a TXT record of the domain:
nslookup -port=port_number -type=TXT example.com name_serverClick to copy
To install the latest version of nslookup in your favorite operating system just copy the nslookup installation command from above and paste it into terminal. It will download and install the latest version of nslookup 2026 package in your OS.