How To Install Dig?
Maintainer: knot packagers
Email: [email protected] .
Website: https://www.knot-dns.cz/
Section: net
Install dig
-
Debian
apt-get install knot-dnsutilsClick to copy -
Ubuntu
apt-get install knot-dnsutilsClick to copy -
Alpine OS
apk add bind-toolsClick to copy -
Arch Linux
pacman -S bind-toolsClick to copy -
Kali Linux
apt-get install dnsutilsClick to copy -
Fedora
dnf install bind-utilsClick to copy -
Raspbian
apt-get install knot-dnsutilsClick to copy
DNS Lookup utility.
How to use dig?
Below are few example commands for dig that you can use in the terminal.
Lookup the IP(s) associated with a hostname (A records):dig +short hostname.comClick to copyLookup the mail server(s) associated with a given domain name (MX record):dig +short hostname.com MXClick to copyGet all types of records for a given domain name:dig hostname.com ANYClick to copySpecify an alternate DNS server to query:dig @8.8.8.8 hostname.comClick to copyPerform a reverse DNS lookup on an IP address (PTR record):dig -x 8.8.8.8Click to copyFind authoritative name servers for the zone and display SOA records:dig +nssearch hostname.comClick to copyPerform iterative queries and display the entire trace path to resolve a domain name:dig +trace hostname.comClick to copy
Installation of latest dig command is available for Debian, Ubuntu, Alpine, Arch, Kali, Fedora and Raspbian. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2026 latest package from the repository and install it in your computer/server.




