Linux nslookup Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux nslookup Guide
Complete beginner-friendly guide to nslookup on Linux, covering Arch Linux, CachyOS, and other distributions including DNS queries, domain lookups, and network troubleshooting.
Table of Contents
nslookup Installation
Install nslookup
Arch/CachyOS:
# Install bind-tools
sudo pacman -S bind
Debian/Ubuntu:
sudo apt install dnsutils
Fedora:
sudo dnf install bind-utils
nslookup Basics
Lookup Domain
Basic usage:
# Lookup domain
nslookup example.com
# Shows DNS information
Query IP
IP lookup:
# Lookup IP
nslookup 8.8.8.8
# Reverse DNS lookup
DNS Queries
Query Type
Specific type:
# Query MX records
nslookup -type=MX example.com
# Query AAAA records
nslookup -type=AAAA example.com
Custom DNS Server
Use server:
# Use specific DNS server
nslookup example.com 8.8.8.8
# Second argument = DNS server
Interactive Mode
Start Interactive
Interactive mode:
# Start interactive
nslookup
# Then type commands:
# > example.com
# > set type=MX
# > example.com
# > exit
Interactive Commands
Commands:
# In nslookup:
# > set type=MX
# > example.com
# > server 8.8.8.8
# > example.com
Troubleshooting
nslookup Not Found
Check installation:
# Check nslookup
which nslookup
# Install if missing
sudo pacman -S bind
Summary
This guide covered nslookup usage, DNS queries, and network troubleshooting for Arch Linux, CachyOS, and other distributions.
Next Steps
- dig Guide - Advanced DNS queries
- host Guide - DNS lookup
- DNS Servers - DNS server setup
- nslookup Documentation:
man nslookup
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.