Dig’s command format is:
dig [format] [@server] [type] [name]where:
-
formatare arguments for controlling Dig’s output format. Useful options to make the output more manageable are:+noall +answerprints just the answer part of the response+shortis like the above but prints only the content of the record
-
serveris the DNS resolver to use. Defaults to whatever is in /etc/resolv.conf -
typeis the DNS query type e.g,AorCNAME. Defaults toA -
name, e.gkb.neurrone.com. Defaults to the query for the empty name,.
Examples
dig @1.1.1.1 kb.neurrone.comqueries cloudflare’s DNS resolver for info onkb.neurrone.comdig ns kb.neurrone.comqueries the default DNS resolver for the NS record forkb.neurrone.com
Setting Default Format
Dig’s output format can be configured by adding a .digrc file in the home directory. E.g, putting +noall +answer
See How to use dig