DNS query without nslookup command

· Alberto's Blog!

How to verify DNS records when the nslookup command is not available.

Problem #

The nslookup command is not available on the system.

Solution #

Use the command getent hosts.

1getent hosts agonza.net

Explanation #

Most of the time, the getent command is available.

Other options include using dig or host, however, if the nslookup utility is not available, these commands are usually not installed either.

last updated: