Ubuntu – How to know what DNS am I using in Ubuntu 12.04

dns

We used to get current DNS settings by:

  cat /etc/resolv.conf

But Ubuntu 12.04 has changed to use the resolvconf framework.
The above commond will only give me this:

  # 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.0.1

And that is not the current DNS settings of my machine.

So, is there any kind of file or command I can refer to?

Best Answer

Let's assume that NetworkManager is managing your network configurations.

Run in terminal

nm-tool | tail -n 8

(Here tail is optional, just for your convenience.) This will tell you your connection information, similar to ipconfig.