nslookup – DNS Query Tool

nslookup is a classic DNS query tool that allows administrators to look up domain name...

Networking Tools Linux Open Source

nslookup is a classic DNS query tool that allows administrators to look up domain name information interactively or in batch mode. While dig is more feature-rich, nslookup remains popular for its simplicity and availability across different operating systems, making it useful for cross-platform environments.

Key Features

  • Interactive Mode – Query multiple domains in one session
  • Cross-Platform – Available on Linux, Windows, and macOS
  • Simple Syntax – Easy to learn and use
  • Server Selection – Query alternate DNS servers

Basic Usage

# Simple lookup
nslookup example.com

# Query specific DNS server
nslookup example.com 8.8.8.8

# Query specific record type
nslookup -type=MX example.com
nslookup -type=TXT example.com

# Reverse lookup
nslookup 8.8.8.8

# Interactive mode
nslookup
> server 8.8.8.8
> set type=MX
> example.com

View Documentation

Was this article helpful?