How to view the DNS address assigned by DHCP?
For at least Ubuntu 15.10 onward (possibly also earlier versions) run in a terminal:
nmcli dev show eth0 | grep IP4
eth0
is the most common iface, but it could be eth1
, eth2
, etc.
For older versions use nmcli dev list iface eth0 | grep IP4
.
$ nm-tool
will also list DNS Servers.
To get the DNS address open terminal (Ctrl+Alt+T) and type:
cat /var/lib/dhcp/dhclient.leases | grep dhcp-server-identifier