In this article, you will learn how to install and dig command nslookup command on Linux. These commands are used for network troubleshooting and collect information about domain names.
Domain Information Gopher Dig is an abbreviation, a DNS lookup utility used to detect and resolve issues related to DNS servers and DNS servers. Because of its ease of use, system administrators rely on this tool to troubleshoot DNS issues.
Nslookup DNS lookup for processing and display important information such as the IP address of the MX records and domain name associated with.
Newer Linux system default while providing dig and nslookup utility. However, older Linux systems may not. Both bind-utils bundled package.
Let's see how to install DNS troubleshooting utilities in Linux.
Dig & nslookup mounted in / RHEL in
# dnf install bind-utils
After a successful installation, use the following command to verify the version.
# You -v
On Debian and any derivatives (including Debian), using the command apt to complete the installation.
# apt install dnsutils
Similarly, to verify the installation, run the command.
# You -v
Installation dig & nslookup on ArchLinux
For ArchLinux, will be installed dig and nslookup commands.
# Pacman -Sy dnsutils
To check the version of dig installed, run.
# You -v
Use the dig command
dig command can be used to query and retrieve the domain name information as follows:
This command displays a lot of information, e.g. dig command version of the utility, DNS server, and the corresponding IP address.
Sample Output
;; Query time: 27 msec
;; SERVER: 192.168.229.2#53(192.168.229.2)
;; WHEN: 三 11月 27 06:01:38 EST 2019
;; MSG SIZE rcvd: 73
To be more specific and displays only the IP domain, append + short parameter as follows:
To check the MX records for the domain name, please run.
Use nslookup command
To use the nslookup utility to retrieve information about the domain name, use the following command.
Sample Output
to sum up
In this article, you learned how to install basic usage in different Linux distributions dig and nslookup command utilities, and commands. We do hope that you can now easily install the utility system in the face of no utility.