How to see DNS reply? or Testing DNS server?

15 Jul 2014
Wonder how the dns works or want to know the dns reply from server? Sometimes when setting up a local dns server we have to test whether it is working or not. Here is how you can test it in Linux.

dig @127.0.0.1 www.google.com