Use the dig command of linux to query domain name DNS information
Editor to share with you the use of linux's dig command to query domain name DNS information, I hope you will learn a lot after reading this article, let's discuss it together!
The full name of the dig command is "domain information groper". It is a tool used to flexibly query DNS. It prints out the response of the DNS domain name server. The dig command is mainly used to query the host address information from the DNS domain name server.
The function of dig command is basically the same as that of nslookup command, but dig command is flexible, easy to use and clear output.
Syntax format: dig [parameters] [IP]
Common parameters:
@ specify the domain name server for domain name resolution-b sends a domain name query request to the domain name server using the specified native ip address-f specifies that dig runs in batch mode The specified file holds DNS task information that requires batch query-p specifies the port number used by the domain name server-t specifies the DNS data type to query (default A)-x performs inverse domain name query-4 uses ipv4 (default)-6 displays command help information using ipv6-h
Reference example
Query the ip of the corresponding domain name:
[root@linuxcool ~] # dig www.linuxcool.com
Reverse parse the query against the target ip:
[root@linuxcool] # dig-x 166.111.4.100
Query the MX record of the target domain name:
[root@linuxcool] # dig-t MX linuxcool.com has finished reading this article. I believe you have a certain understanding of using linux's dig command to query domain name DNS information. Want to know more about it. Welcome to follow the industry information channel. Thank you for reading!