Back to the command reference

nslookup

NetworkBeginner In real Linux

Query DNS for a name

Name: nslookup = name server lookup

This command needs a real Linux system; you can practise it in real Linux mode.

Description

nslookup looks up the IP addresses for a name (or the reverse). It exists on Windows too and is simple to use; for detail, use dig.

Syntax

nslookup NAME [SERVER]

Common options

-type=TYPEThe record type, e.g. -type=MX
SERVERA second argument: the DNS server, e.g. nslookup example.com 8.8.8.8

Examples

  • $ nslookup web01

    Look up a host name’s address

    Explain
  • $ nslookup db01 127.0.0.1

    Ask a particular DNS server

    Explain

Related