18.04 LTS server running on Google cloud. It says ‘-bash: dig: command not found‘ I tried apt install dig command, but it failed. How do I install dig command on Ubuntu or Debian Linux using the command line over ssh?
Introduction: The dig command is primarily used to query DNS servers. It is a useful tool for network troubleshooting. It is popular due to its flexibility, simple to use, and crystal clear output over host command. This page shows how to install dig command on a Ubuntu using the bash shell. You must log in as root user to install the following package.
BIND (Berkeley Internet Name Domain) is an implementation of the DNS (Domain Name System) protocols. BIND includes a DNS server (named), which resolves host names to IP addresses; a resolver library and tools for verifying that the DNS server is operating properly. However, bind is not installed by default including the dig command.
You must install dnsutils package on an Ubuntu based system. It contains a collection of utilities (such as dig command and other) for querying DNS name servers to find out information about internet hosts. These tools will provide you with the IP addresses for given host names, as well as other information about registered domains and network addresses.
# apt-get update # apte-get install dnsutils
How do I use dig command on Ubuntu/Debian?
The syntax is as follows:
dig Hostname dig DomaiNameHere dig @DNS-server-name Hostname dig @DNS-server-name IPAddress dig @DNS-server-name Hostname|IPAddress type
- CSF: disable icmp ping
- How to fix ‘add-apt-repository command not found’ Error on Ubuntu and Debian
- How to change static ip address on Ubuntu server 18.04
- how to setup source based (policy based) routing on debian / ubuntu
- quickstart guide to install suricata on debian 11 system