The dig
command is part of the dnsutils package in Ubuntu. To install the dig
command on Ubuntu, you can use the apt package manager.
Here are the steps to install dig command on Ubuntu:
- Open a terminal window on your Ubuntu system.
- Run the following command to update the package list and ensure that you have the latest version of dnsutils package:
sudo apt update
- Run the following command to install the dnsutils package, which includes the
dig
command:
sudo apt install dnsutils
- Once the installation is complete, you can verify that the
dig
command is installed by running the following command:
dig --version
- Now you can use the
dig
command to query DNS servers for information about a domain or IP address.
Note: In some cases you might have to run the command with sudo
prefix. Also, depending on your ubuntu version and package manager you might have to use apt-get
instead of apt
.