Command-line to list DNS servers
- by Anurag Uniyal
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