dig - DNS lookup utility

DESCRIPTION
dig (domain information groper) is a flexible tool for interrogating
DNS name servers. It performs DNS lookups and displays the answers that
are returned from the name server(s) that were queried. Most DNS
administrators use dig to troubleshoot DNS problems because of its
flexibility, ease of use and clarity of output. Other lookup tools tend
to have less functionality than dig.

for example, you can use this command if you have a mail server and you are not able to send mail to a particular domain name like www.example.com - so you can use the dig command to hep you find out if their DNS records are correct:

# dig -t mx example.com

the -t option sets the query type