Wazaterm » Linux Commands » dig

How to use dig Linux command

The dig (domain information groper) command is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried.


Debian ubuntu

$ sudo apt install dnsutils


Perform basic DNS lookups with the specified name server (e.g. )

$ dig @ www.wazaterm.com

Search for SPF records

$ dig wazaterm.com txt

Perform IPv6 DNS lookups

$ dig AAAA dns.google

Get hostname from IP Address(Reverse lookup)

$ dig -x

Check MX record of the domain

$ dig gmail.com MX

Perform basic DNS lookups

$ dig www.wazaterm.com