The dog is an open-source tool for DNS lookup. It allows to get various DNS records (A, AAAA, MX, NS, etc.) for a domain. This tool has colourful output, supports the DNS-over-TLS and DNS-over-HTTPS protocols, can provide output in JSON format. The dog command can be used as an alternative to the dig command.
This tutorial explains how to install and use dog command on Ubuntu 20.04.
Run the following command to download GPG key and add it to a list of the trusted keys:
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
Add Azlux's repository:
echo "deb http://packages.azlux.fr/debian/ stable main" | sudo tee /etc/apt/sources.list.d/azlux.list
Update the package lists with command:
sudo apt update
sudo apt install -y dog
When finished, we can check dog version:
dog command can query different DNS records. For example, the following command retrieves A, AAAA, MX, and NS records for a given domain:
dog google.com A AAAA MX NS
If you wish to completely remove dog, execute the following command:
sudo apt purge --autoremove -y dog
Remove GPG key and repository:
sudo apt-key del 0312D8E6 sudo rm -rf /etc/apt/sources.list.d/azlux.list