Installation and use of nslookup and dig in Linux system
This article mainly explains "the installation and use of nslookup and dig in the Linux system". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's ideas to study and learn "the installation and use of nslookup and dig in the Linux system".
Fedora / Centos system:
Yum-y install bind-utils
Debian / Ubuntu system:
Apt-get-y install dnsutils
A brief introduction to how to use nslookup to check DNS information.
1. Enter the command in the terminal: nslookup
2. Set the DNS server used by nslookup, enter server DNS_server_ip and enter enter
3. Check the MX record of a DNS domain name. Enter set q=mx first, and then enter the DNS domain name you want to check, such as teddysun.com.
4. To display other records, enter set q=any first, and then enter the name of the record you want to query, as shown in the following figure.
This paper briefly introduces the method of querying DNS using the dig command.
1. This is a query with comments. The command is as follows:
Dig teddysun.com
The output is as follows:
; DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 teddysun.com
;; global options: + cmd
;; Got answer:
;;-> > HEADER