Network

nslookup

Query DNS servers for name resolution interactively or non-interactively.

Synopsis

syntax
nslookup [HOST] [SERVER]

Examples

Look up IP address for domain
nslookup example.com
Query mail exchange records
nslookup -type=MX example.com
Query using specific DNS server
nslookup example.com 8.8.8.8
Query TXT records
nslookup -type=TXT example.com

Common options

FlagDescription
-typeQuery type (A, MX, NS, SOA, TXT, etc)
-timeoutTimeout in seconds
-debugEnable debugging output

About nslookup

The `nslookup` command query DNS servers for name resolution interactively or non-interactively. Networking commands handle connectivity testing, DNS resolution, data transfer, remote access, firewall rules, and traffic analysis.

Linux is the dominant server operating system, and strong networking skills are essential for web hosting, container orchestration, security auditing, and infrastructure management. The command accepts 3 commonly used flags shown above, though the full set of options is available in the man page (`man nslookup`).

The 4 examples on this page cover typical real-world usage patterns that you can copy and adapt for your own workflows.

Related commands

More Network Commands

Other commands in the Network category

Related tools