Feb 242021

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 dev show | grep DNS

$ nmcli dev show | grep DNS

2. 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

3. nmcli device show | grep IP4.DNS

$ nmcli device show eno3 | grep IP4.DNS

4. systemd-resolve –status

You may have to scroll down (press the tab key) to see full output.

systemd-resolve --status
          DNSSEC NTA: 10.in-addr.arpa
                      [output truncated]
         DNS Servers:
          DNS Domain: ~.

Sorry, the comment form is closed at this time.