Command-line to list DNS servers

Posted by Anurag Uniyal on Ask Ubuntu See other posts from Ask Ubuntu or by Anurag Uniyal
Published on 2012-06-18T14:36:27Z Indexed on 2012/06/18 15:23 UTC
Read the original article Hit count: 384

Filed under:
|

Is there a command to list dns servers?

I tried

$ 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.0.1
$ cat /etc/network/interfaces 
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

But it doesn't list any servers, if I go to "Network GUI Tool", in Wireless section it lists "DNS 192.168.1.1 8.8.8.8 8.8.4.4"

Can I get same information from command line?

I am using Ubuntu 12.04 LTS

© Ask Ubuntu or respective owner

Related posts about command-line

Related posts about dns