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 -yCheck dig version:
dig -vFind a domain’s IP address:
dig google.comCheck DNS A record:
dig A google.comCheck MX (mail) records:
dig MX google.comCheck NS (nameserver) records:
dig NS google.comReverse lookup (IP → domain):
dig -x 8.8.8.8Use nslookup:
nslookup google.comQuery a specific DNS server:
dig @8.8.8.8 example.com