How to install dig on Ubuntu, ArchLinux, OpenSuse and Alpine.
2020-02-28
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.
Hey, I'm Chase. I help aspiring entrepreneurs and makers turn their ideas into digital products and apps.
Subscribe to my Newsletter
Every other week I publish the Curiously Crafted newsletter.
In it, I explore the intersection of curiosity and craft: the people who make stuff, what they make and the way they pursue the craft of making.