Skip to content

Linux nslookup Guide

Mattscreative edited this page Nov 20, 2025 · 2 revisions

🔍 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

  1. nslookup Installation
  2. nslookup Basics
  3. DNS Queries
  4. Interactive Mode
  5. Troubleshooting

📦 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


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally