This is useful when troubleshooting some network related issues and you need to find which DNS servers are being used. Since resolv.conf is not really used much anymore, it’s most likely that your DNS settings are set in the NIC configuration file, which is located at /etc/network/interfaces. 

You can also print which DNS is being used on a per interface basis by doing the below – 

Identify the NIC you want to use by using 

ifconfig

Once the names of the NIC’s have been printed, find the one you want and issue this command 

nmcli device show <INTERFACE NAME> | grep IP4.DNS

Obviously replace the “<INTERFACE NAME>” with you know what.