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 device show | grep IP4.DNS

$ nmcli device show eno3 | grep IP4.DNS

2. nmcli dev show | grep DNS

$ nmcli dev show | grep DNS

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

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: ~.
 Posted by at 10:49 am

Sorry, the comment form is closed at this time.