If you’re a networking or sys admin student, you might want to know how to identify the DNS server address of your Linux system on the Command Line.
DNS refers to the Domain Name System, which resolves domain names into IP addresses.
In this case, we’re talking specifically about finding the DNS server on the Linux Mint or Ubuntu desktop via the command line interface.
Identify DNS Server Address via CLI
Here are a few command line tools that should help you identify the DNS server on your Linux Mint system.
I’ve tested the following commands on Linux Mint and Ubuntu.
1. nmcli device show | grep IP4.DNS
$ nmcli device show eno3 | grep IP4.DNS IP4.DNS: 126.96.36.199 IP4.DNS: 188.8.131.52
2. nmcli dev show | grep DNS
$ nmcli dev show | grep DNS IP4.DNS: 184.108.40.206 IP4.DNS: 220.127.116.11
3. nmcli dev show | grep DNS | sed ‘s/\s\s*/\t/g’ | cut -f 2
$ nmcli dev show | grep DNS | sed 's/\s\s*/\t/g' | cut -f 2 18.104.22.168 22.214.171.124
4. systemd-resolve –status
You may have to scroll down (press the tab key) to see full output.
systemd-resolve --status Global DNSSEC NTA: 10.in-addr.arpa 16.172.in-addr.arpa 168.192.in-addr.arpa 17.172.in-addr.arpa [output truncated] DNS Servers: 126.96.36.199 188.8.131.52 DNS Domain: ~.