How To Install Dig in Ubuntu Linux

One tool I’m used to having without installing (it’s included by default in FreeBSD) is Dig (which is short for Domain Information Groper). Dig is a really handy tool for checking and troubleshooting DNS related issues once you learn how to use it. For instance, it makes it easy to see how your MX records are resolving:

CODE:
  1. # dig google.com mx
  2.  
  3. ; <<>> DiG 9.3.2-P2.1 <<>> google.com mx
  4. ;; global options:  printcmd
  5. ;; Got answer:
  6. ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41334
  7. ;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0
  8.  
  9. ;; QUESTION SECTION:
  10. ;google.com.                    IN      MX
  11.  
  12. ;; ANSWER SECTION:
  13. google.com.             10212   IN      MX      10 smtp3.google.com.
  14. google.com.             10212   IN      MX      10 smtp4.google.com.
  15. google.com.             10212   IN      MX      10 smtp1.google.com.
  16. google.com.             10212   IN      MX      10 smtp2.google.com.
  17.  
  18. ;; Query time: 1 msec
  19. ;; SERVER: 208.67.220.220#53(208.67.220.220)
  20. ;; WHEN: Sat Nov  8 02:56:08 2008
  21. ;; MSG SIZE  rcvd: 116

Luckily this is easy to install, just not terribly intuitive or easy to find as it’s not a package known as dig:

CODE:
  1. # sudo apt-get install dnsutils

That’s pretty much it– you should now be able to use dig!

This entry was posted in Culture, Operating Systems, Tips, Hacks, & Tricks, Tools and tagged , , , , , , . Bookmark the permalink.

4 Responses to "How To Install Dig in Ubuntu Linux"

Leave a reply