To install the dig
command on Debian 9, follow these steps:
sudo apt-get update
dnsutils
package, which includes the dig
command:sudo apt-get install dnsutils
That's it! The dig
command should now be installed on your system. You can use it to query DNS servers for various types of information.
For example, to look up the A record for a domain, you can use a command like this:
dig A example.com
To look up the MX records for a domain, use a command like this:
dig MX example.com
There are many other options and features available with the dig
command. You can learn more by reading the man page:
man dig