Djbdns has a set of handy command line utilities that are ready to use once you install it. The following is a list of some of those commands followed by a brief description.
dnsip fqdn
dnsipq
dnsmx fqdn
dnsname 1.2.3.4
dnsq
dnsqr
dnstrace
dnstracesort
dnstxt |