Dig is included with BIND tools on most platforms. The package name varies by operating system, but the command behaves consistently once installed.
Debian and Ubuntu
sudo apt update
sudo apt install dnsutilsRed Hat, Fedora, AlmaLinux, Rocky Linux
sudo dnf install bind-utilsmacOS
macOS usually includes dig by default. Check with:
dig -vWindows
On Windows, the easiest terminal options are Windows Subsystem for Linux, a BIND tools package, or a browser-based Dig lookup. If you only need a quick check, a web lookup avoids installing extra utilities.
When installation is not worth it
If you are on a locked-down workstation, a phone, a customer machine, or a temporary support session, using an online Dig page is often faster than installing command-line tools.