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 dnsutils

Red Hat, Fedora, AlmaLinux, Rocky Linux

sudo dnf install bind-utils

macOS

macOS usually includes dig by default. Check with:

dig -v

Windows

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.