I have a Xubuntu Server 14.04 x64.
How do I list all DNS servers that are in use without NetworkManager which is not even installed?
They are defined in /etc/resolv.conf
.
The DNS setting can be specified in /etc/network/interfaces
and resolve.conf
could be blank. Because the DNS entry can be in multiple locations, I think it is best to do an actual DNS query with the verbose mode switch. The output lines that start with the word "Received" will show the DNS server used by your host. In this example, I use www.news.com
host -v www.news.com | grep Received
To extend answer from @fkraiem:
You can list DNS servers currently in use by executing the following command from the terminal:
more /etc/resolv.conf
DNS servers are configured during DHCP negotiation or specified statically in /etc/network/interfaces
. After that they are added dynamically to /etc/resolv.conf
. Do not edit this file though as it will be overwritten with each network switch or system reboot.