How to check the DNS I am using on Linux?

My Linux distro is Linux Mint 17 (Ubuntu 14.04.1 LTS (Trusty Tahr)). I am using NetworkManager.

The old trick does not work:

$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1

If you are using NetworkManager, the /etc/resolv.conf will point to your machine to dnsmasq as configured by NetworkManager. You can get the real DNS server you will use from NetworkManager by:

nm-tool | grep DNS
Answered by Eric Z Ma.

Eric Z Ma

Eric is a father and systems guy. Eric is interested in building high-performance and scalable distributed systems and related technologies. The views or opinions expressed here are solely Eric's own and do not necessarily represent those of any third parties.

One comment:

Leave a Reply

Your email address will not be published. Required fields are marked *