Ubuntu 22.04 using systemd-resolvd configuration like netplan:
resolvectl status
If you have Dekstop version with network manager installed:
nmcli dev show | grep DNS
For earlier Ubuntu servers:
systemd-resolve –status
History
cat /etc/resolv.conf will give you some info about how you resolve, however it won’t show you the nameservers anymoew.
nameserver 127.0.0.1
or
nameserver 127.0.0.53
because Ubuntu uses dnsmasq, resolvconf, or more recently systemd to get it’s name servers from Network Manager.