I want to know which DNS servers are in effect when I run commands like nslookup, dig, host, ping, etc.The general answer is to cat /etc/resolv.conf, or to look at NetworkManager, but that's only going to show me the list of servers that I normally use.  It won't show me any DNS servers that got pushed to me when I connect to a VPN.Is there a way to get an in-order list of DNS servers that commands like nslookup, dig, host, ping, etc will attempt to use?
List all DNS Servers, including those pushed by VPN
dns;vpn;networkmanager;openvpn;resolvconf
If you're using NetworkManager you can use the command line tool that's part of it, nmcli to get this list:$ nmcli dev list iface wlan0 | grep IP4IP4-SETTINGS.ADDRESS:           192.168.1.110IP4-SETTINGS.PREFIX:            24 (255.255.255.0)IP4-SETTINGS.GATEWAY:           192.168.1.1IP4-DNS1.DNS:                   192.168.1.8IP4-DNS2.DNS:                   192.168.1.5IP4-DNS3.DNS:                   24.92.226.11You have to change the bit, wlan0 to whatever is your network interface. You can make it a bit more dynamic by using the iwgetid command:$ nmcli dev list iface $(iwgetid | awk '{print $1}') | grep IP4You can also use nm-tool to get a full report:$ nm-tool ...  IPv4 Settings:    Address:         192.168.1.110    Prefix:          24 (255.255.255.0)    Gateway:         192.168.1.1    DNS:             192.168.1.8    DNS:             192.168.1.5    DNS:             24.92.226.11