Common usage of dig command
install dig
apt install dnsutils
## or
yum install bind-utils
simple query
dig example.com
query with specific type
## q-type is one of (a,any,mx,ns,soa,hinfo,axfr,txt,...) [default:a]
dig txt example.com
shorten the result
dig +short example.com
verbose the process
dig +trace example.com
specify DNS server
dig @114.114.114.114 example.com