Command-line to list DNS servers used by my ... - Ask Ubuntu
https://askubuntu.com/questions/15259319.08.2015 · On an Ubuntu Server 18.04, if you don't want to install anything extra like nm-tool, then systemd-resolve --status will work out of the box for DNS information. If you're interested getting not only your DNS servers, but also default gateway, IP address, network mask, etc, then netplan ip leases eth0 will give you all that information in an easy-to-read form (assuming you're …