Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the dig command of Linux

Shulou Source: shulou.com Published: 2022-06-01 18:27:46 10月03日 Update

In this article, the editor introduces in detail "how to use the dig command of Linux". The content is detailed, the steps are clear, and the details are handled properly. I hope that this article "how to use the dig command of Linux" can help you solve your doubts.

Linux common command dig command is the full name of "domain information groper", it is a flexible query DNS tool, it will print 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.

Syntax format: dig [parameters] [IP]

Common parameter: @ specify the domain name server for domain name resolution-b sends a domain name query request ‎-f ‎ to the domain name server using the specified native ip address-specify dig to run in batch mode The specified file stores the DNS task information that needs to be queried in batches-p specifies the port number used by the domain name server-t specifies the DNS data type to query (default is A)-x performs reverse domain name query-4 uses ipv4 (default)-6 uses the ipv6 ‎ H ‎ display command to help the information instance query the ip of the corresponding domain name:

[root@linuxcool ~] # dig www.linuxcool.com performs reverse parsing query on 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 read this article "how to use the dig command of Linux". If you want to master the knowledge of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, please follow the industry information channel.

Tags: Domain name query command server service information article content parameter address commonly used target help proper host task full name slogan instance tool Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Docker MySQL Apple