Search | Running | Sailfish OS | All Posts | About Me

Using .digrc to simplify your DNS troubleshooting

September 20, 2024 — Nico Cartron

dig, a very useful DNS tool (part of ISC BIND 9) has many opions, if you look at DIG(1).

As with many command-line tools, it is possible to use a dotrc file, called .digrc, usually located in the user's home directory (~/.dotrc).

This file just has to contain the flags you want to use, e.g.:

+rrcomments
+nocmd
+noadditional

Just bear that in mind when using it later, as it may "backfire" if you're troubleshooting some DNS weirdness, and end up having an option applied that you did not expect :-)

Edit 2024-09-24

Stéphane Bortzmeyer rightfully pointed out on Twitter that it's possible to overwrite an option that you have defined in your .digrc: say you have +dnssec as attribute, if you pass +nodnssec in the command line, then this will in fact disable the display of the DNSSEC records.


Tags: DNS


I don't have any commenting system, but email me (nicolas at ncartron dot org) your comments!
If you like my work, you can buy me a coffee!