Score:0

Get DNS servers CLI ubuntu desktop 20.04

mx flag

I've set up servers using netplan. If I run nslookup or networkctl status --all none of them retrieve the Nameservers.

  • nslookup blahblah.com
Server:     127.0.0.53         # what is this?
Address:    127.0.0.53#53      # what is this?

Non-authoritative answer:
Name:   www.remoteserver.com
Address: 52.128.23.153
  • networkctl status
                          Type: wlan
                         State: routable (unmanaged)
                        Driver: rtl8821ae
                        Vendor: Realtek Semiconductor Co., Ltd.
                         Model: RTL8821AE 802.11ac ...
             WiFi access point: ...
                       Address: 192.168.8.109
                                a::b:c:d:6dff
                       Gateway: 192.168.8.1 (...)

Only nm-cli shows the servers:

nmcli device show | grep DNS
IP4.DNS[1]:                             192.168.8.1
IP4.DNS[2]:                             8.8.8.8
IP4.DNS[3]:                             8.8.4.4

Now, this is fine but what is the method to get the DNS servers when nm-cli (and also network manager) are not installed? Why do the other commands result useless although both should return the DNS server?

chili555 avatar
cn flag
"Address: 127.0.0.53#53 # what is this?" That is evidence that dnsmasq is running and has the answer and, in this case, a resolver outside of your own system wasn't required.
Minsky avatar
mx flag
@chili555 how come a resolver outside the system isn't required, when i typed an address Ive never typed before...?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.