Dig Usage

Basic usage of CentOS command, dig, provided by package bind-utils

Find A record of a domain name with current DNS set

dig example.com

dig

Find A record of a domain name with specified DNS, 1.1.1.1

dig example.com @1.1.1.1

dig

Show terse result

dig example.com @1.1.1.1 +short

dig

Show trace from root domain to destinated domain name

dig example.com @1.1.1.1 +trace

dig

Reverse lookup and IP address, pay attention, it is - sign, not +

dig -x 1.2.3.4

dig