Linux command (PNS): Dig command-domain search tool

Source: Internet
Author: User
Tags nslookup

Dig command

Function description

Dig and Nslookup, as well as the Domain name Query tool, is used to test the domain Name system is working properly. These two commands are all under the Bind-utils package, dig use is more convenient than Nslookup. Use the following:

dig [parameters] [options]

Common parameters

Options Description
@server If you do not want to use/etc/resolv.conf as the DNS host, you can fill in the other IP
-T (Type) Specify query type
-X Reverse Query
+short Provide a short reply, the default is long

Example

domain name resolves to an IP address

[Email protected] ~]# dig-t A www.baidu.com


; <<>> DiG 9.9.4-redhat-9.9.4-29.el7_2.4 <<>>-T A www.baidu.com

;; Global options: +cmd

;; Got Answer:

;; ->>header<<-opcode:query, Status:noerror, id:13748

;; Flags:qr Rd RA; Query:1, Answer:3, authority:0, additional:0


;; QUESTION section:

; www.baidu.com. In A


;; ANSWER section:

www.baidu.com. 196 in CNAME www.a.shifen.com.

Www.a.shifen.com. 292 in a 220.181.112.244

Www.a.shifen.com. 292 in a 220.181.111.188


;; Query Time:7 msec

;; server:219.141.140.10#53 (219.141.140.10)

;; When: 512 months 10:00:52 CST 2016

;; MSG SIZE rcvd:90

query a record of JD.com

[Email protected] ~]# dig JD.com A +noall +answer

querying MX records for JD.com

[Email protected] ~]# dig JD.com MX +noall +answer

querying authoritative DNS for JD.com

[Email protected] ~]# dig JD.com NS +noall +answer

     view a short reply

[Email protected] ~]# dig JD.com +short


Learn from:

Http://www.cnblogs.com/daxian2012/archive/2013/01/10/2854126.html


This article is from the "Zhao Dongwei blog" blog, make sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1881056

Linux command (PNS): Dig command-domain search tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.