How install dig command on Arch Linux

I am playing with Arch Linux installation for fun. Unfortunately, I was missing the dig command on my Arch Linux VM installed with VirtualBox and Window 10 pro.

How to install dig on Arch Linux

I searched for dig command

pkgfile dig
pacman -Ss dig

I viewed output carefully:

extra/bind
community/epic4

I wasn’t sure which one I needed so I typed:

pacman -Si extra/bind

and it confirmed that this package has dns utilities

epository      : extra
Name            : bind
Version         : 9.16.21-1
Description     : A complete, highly portable implementation of the DNS
                  protocol
Architecture    : x86_64
URL             : https://www.isc.org/software/bind/
Licenses        : MPL2
Groups          : None
Provides        : bind-tools  dnsutils  dns-server
Depends On      : bash  dnssec-anchors  e2fsprogs  glibc  icu  libedit  json-c
                  krb5  libcap  libidn2  libmaxminddb  libnsl  libuv  libxml2
                  lmdb  openssl  python  python-ply  readline  xz  zlib
Optional Deps   : None
Conflicts With  : bind-tools  dnsutils
Replaces        : bind-tools  dnsutils  host
Download Size   : 2023.70 KiB
Installed Size  : 6920.60 KiB
Packager        : S
Build Date      : Sat Sep 18 23:57:33 2021
Validated By    : MD5 Sum  SHA-256 Sum  Signature

SoI found references to bind-utils package.

Installing dig on Arch Linux

I type as root

su -
pacman -Syu bind
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (1) bind-9.16.21-1

Total Installed Size:  6.76 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                     [#####################] 100%
(1/1) checking package integrity                   [#####################] 100%
(1/1) loading package files                        [#####################] 100%
(1/1) checking for file conflicts                  [#####################] 100%
(1/1) checking available disk space                [#####################] 100%
:: Processing package changes...
(1/1) installing bind                              [#####################] 100%
:: Running post-transaction hooks...
(1/4) Creating system user accounts...
(2/4) Reloading system manager configuration...
(3/4) Creating temporary files...
(4/4) Arming ConditionNeedsUpdate...

How to use dig

dig google.com
dig MX google.com
dig AAAA google.com
dig TXT google.com @1.1.1.1
man dig

Package

https://archlinux.org/packages/extra/x86_64/bind/

I hope you like my tutorial.


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki