I often find myself working in Docker containers interactively and when I do, the images I use don't usually have dig
or nslookup
installed. This is further complicated by the fact that those utilities aren't standalone packages, so I forget which collection of utilities they belong to. Here's how to install dig
and nslookup
with a few Linux flavored package managers.
dig
and nslookup
are in dnsutils
on Ubuntu (debian):
apt update && apt install dnsutils
dig
and nslookup
are in bind-tools
on ArchLinux:
pacman -Syu && pacman -Sy dnsutils
dig
and nslookup
are in bind-tools
on OpenSUSE:
zypper update && zypper install dnsutils
dig
and nslookup
are in bind-tools
on Alpine:
apk update && apk add bind-tools
Now that they're installed you can run dig -v
and nslookup -v
to verify they're present.