What is the install command?
sudo dnf install -y bind-utils dig -v
On CentOS Stream 9, Rocky Linux 9 and AlmaLinux 9 the package is bind-utils. It contains the client tools from the BIND project: dig, nslookup, host, nsupdate and delv. It does not install or start a DNS server; that would be the separate bind package. dig -v prints the version, confirming the tool runs.
The package name differs on other systems: bind9-dnsutils on Debian and Ubuntu, bind-tools on FreeBSD. Knowing that saves a search when you switch between images.
Why is dig missing in the first place?
Minimal installs keep only what the system needs to boot and be reached. DNS client tools are a convenience, so they are left for you to add. The same applies to traceroute, tcpdump, lsof and bash-completion; installing them together right after the first login saves time later:
sudo dnf install -y bind-utils traceroute tcpdump lsof bash-completion
What if dnf cannot find the package?
- Metadata is stale or the network is down: run
sudo dnf clean all && sudo dnf makecacheand check you can reach the mirrors withcurl -sI https://dl.rockylinux.org/or your distribution's equivalent. - A repository is disabled: bind-utils lives in AppStream;
dnf repolistmust list it. - Name resolution itself fails: dnf cannot reach mirrors by name. Check
/etc/resolv.conf, described below.
Which resolver will dig use?
The first nameserver line in /etc/resolv.conf, unless you name another with @server. On Enterprise Linux, NetworkManager usually writes that file:
cat /etc/resolv.conf nmcli dev show | grep -i dns
If resolv.conf points to 127.0.0.53, systemd-resolved is active and forwards queries upstream; resolvectl status shows where. Knowing the default matters, because "dig says X" really means "this resolver says X".
How do I run a first useful query?
| Goal | Command |
|---|---|
| Address of a name | dig +short app.example.net |
| Ask a public resolver | dig @9.9.9.9 +short app.example.net |
| Mail servers | dig MX example.net +short |
| Validate DNSSEC | delv example.net |
| Quick lookup | host app.example.net |
delv is a lesser-known member of the package: it validates DNSSEC itself and reports "fully validated" or the reason validation failed, which is clearer than reading flags in dig's output.
Is there a lighter alternative?
For simple lookups, getent hosts app.example.net works without any extra package. It goes through the system's normal name resolution, including /etc/hosts, which is exactly what applications see. That makes it the right check when an app fails to resolve a name but dig succeeds: the difference usually lies in /etc/hosts or nsswitch.conf. And resolvectl query answers the same question on systems running systemd-resolved.
What next?
The full set of dig options is in The dig command, and nslookup in The nslookup command. All three Enterprise Linux images install free on every model, x86 and Arm; the differences between them are on the Rocky Linux, AlmaLinux and CentOS Stream pages.
Which machines run these images well?
Any of them. Rocky Linux 9, AlmaLinux 9 and CentOS Stream 9 install free on all 68 models, including the Arm line with arm64 builds, so the commands on this page work the same from the cheapest box to the largest. People who pick the Enterprise Linux family for hosting panels or software certified for that ecosystem often start on the entry or single-CPU lines, shown below with their monthly prices. Each machine includes one IPv4 address, so a DNS tool kit like bind-utils is one of the first things worth adding: you will use dig to check the records you point at that address.
Can I keep the tools updated automatically?
Yes. bind-utils receives security fixes through the normal AppStream updates, so dnf upgrade or the dnf-automatic timer keeps it current with the rest of the system. Enable automatic security updates with dnf install dnf-automatic, set upgrade_type = security in /etc/dnf/automatic.conf and run systemctl enable --now dnf-automatic.timer.
Machines Often Run with Rocky Linux or AlmaLinux
| Server | Processor | Cores / threads | Memory | Storage | Network | Per month | Smallest order |
|---|---|---|---|---|---|---|---|
| E1 | Intel Xeon E3-1240 v3 | 4 / 8 | 16 GB DDR3 | 2x 240 GB SSD | 2x 1 Gbps | $30.52 | $91.56 (3 months) |
| S1 | Intel Xeon E-2276G | 6 / 12 | 64 GB DDR4 | 1x 1 TB NVMe | 2x 10 Gbps | $53.32 | $53.32 (1 month) |
| S4 | Intel Xeon E-2388G | 8 / 16 | 64 GB DDR4 | 1x 1 TB NVMe | 2x 10 Gbps | $87.52 | $87.52 (1 month) |
| A1 | Ampere Altra Q80-30 | 80 / 80 | 256 GB DDR4 | 2x 2 TB NVMe | 2x 25 Gbps | $252.11 | $252.11 (1 month) |
Keep Reading
The dig command
Query DNS precisely with dig: record types, short answers, specific resolvers, full delegation traces, reverse lookups and DNSSEC checks.
OpenThe nslookup command
Look up DNS records with nslookup on any system, use its interactive mode, switch servers and record types, and know when dig is better.
OpenRocky Linux
Rocky Linux 9, a free Red Hat compatible rebuild focused on staying bug for bug identical to its upstream.
OpenCentOS Stream
CentOS Stream 9 lets you test the next Red Hat minor release early, on a full machine of your own.
OpenFAQ
Quick Answers
bind-utils. Install it with dnf install bind-utils.
No. It contains client tools only; the server is the separate bind package.
nslookup, host, nsupdate and delv, alongside dig.
dig queries DNS directly, while apps also read /etc/hosts. Compare with getent hosts.
bind9-dnsutils, with dnsutils kept as a transitional name.