nslookup

nslookup is Dig's older cousin, and in fact, Dig shares a lot of source code with nslookup. The general command-line syntax is as follows:

nslookup [-option ...] [host-to-find | -[server]]

nslookup has two main modes of operation, interactive and command line:

$ nslookup -query=any www.penguin.bv
Server:  localhost
Address:  127.0.0.1

www.penguin.bv  CPU = PC        OS = Tunes
www.penguin.bv  preference = 10, mail exchanger = mail.penguin.bv
www.penguin.bv  preference = 20, mail exchanger = mail.herring.bv
www.penguin.bv  internet address = 192.168.55.3
penguin.bv      nameserver = ns.penguin.bv
penguin.bv      nameserver = ns.herring.bv
mail.penguin.bv internet address = 192.168.55.2
ns.penguin.bv   internet address = 192.168.55.2

The interactive mode is ...

Get Concise Guide to DNS and BIND, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.