Ubuntu – Using networkd, how to see DNS Server

netplan

So the Ubuntu server is configured with netplan and the renderer is: networkd.

How does one see the active DNS Server ? i.e. there is no NetworkManager.

Best Answer

When using netplan (17.10 Artful Ardvark on) and the renderer is: networkd, there is no NetworkManager so the nmcli commands do not apply. The cat /etc/resolv.conf simply shows the nameserver to be 127.0.0.53, not very helpful really ;-)

To get the nameservers.

ubuntu@ub-17-10:~$ systemd-resolve --status | sed -n '/DNS Servers/,/^$/p'
         DNS Servers: 192.168.92.201
                      8.8.8.8
          DNS Domain: netlabsug.tst