Terminal Dojo
Help العربية Sign inGet started

Command library / nslookup

nslookup

BashDraft — pending expert review3 practice missions

Query DNS the simple, interactive-friendly way

An older, simpler DNS lookup tool than dig — available on both Linux and Windows, which makes it the one that works everywhere. One-shot mode is just the domain name; giving a second argument picks a specific DNS server to ask instead of the default.

Practice nslookup

Usage

nslookup name [server]

Options and flags

Examples

Common mistakes

nslookup 8.8.8.8 example.com nslookup example.com 8.8.8.8

The name you're looking up comes first; the DNS server to ask comes second — reversed, nslookup tries to look up '8.8.8.8' using 'example.com' as a name server.

Related commands

dig