Using other DNS Server to dig

We all know the usage of dig command in Linux. And when you use the dig command to query nameserver it will by default uses the DNS servers which is mentioned in your /etc/resolv.conf file.

Using dig you can also use a different DNS server to complete the query rather than using the ones mentioned in your /etc/resolv.conf file.

Just use @dnsserver while performing the query.

In this example first I have used my machine /etc/resolv.conf file to dig than in the right hand side terminal I have used DNS server to query the (rather than using the local /etc/resolv.conf file).

Here is the illustrated screenshot.


Using other DNS Server to use dig

Using other DNS Server to use dig