Home / nslookup: command not found error on Debian

nslookup: command not found error on Debian

If you need to use nslookup on a Debian server and you're getting an "nslookup: command not found" then use apt-get to install dnsutils.

Error message

You'll know if dnsutils & nslookup are not installed if you try a dns lookup and get this error:

$ nslookup www.example.com
-bash: nslookup: command not found

Install dnsutils

Install the dnsutils package to resolve the error and lookup the domain:

$ apt-get install dnsutils

And now it works

$ nslookup www.example.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	www.example.com
Address: 93.184.216.34