All     Ethical Hacking     Networking     Programming     OSINT

dnsutils in Termux – Installation & Basic Commands

dnsutils is a useful package in Termux that gives you DNS‑related tools like dig and nslookup. These commands help you check domain IPs, DNS records, name servers, and troubleshoot network issues easily from your phone.

Installation & Basic Commands

Installing dnsutils is very simple, and after installation, you can run DNS lookup commands instantly.

Install dnsutils:

pkg install dnsutils -y

Check dig version:

dig -v

Find a domain’s IP address:

dig google.com

Check DNS A record:

dig A google.com

Check MX (mail) records:

dig MX google.com

Check NS (nameserver) records:

dig NS google.com

Reverse lookup (IP → domain):

dig -x 8.8.8.8

Use nslookup:

nslookup google.com

Query a specific DNS server:

dig @8.8.8.8 example.com