How to see my DNS server IP on Linux

Old way:
Examine list of DNS servers in /etc/resolv.conf:

$ cat /etc/resolv.conf

– – –

New way:
May not work on newer Linuxes since resolving may be setup via (not only DNS, but also) various other services: DDNS, LDAP, Avahi, Bonjour, ZeroConf and God knows what else.

So…

To check up your DNS server, better use this command:

$ nmcli dev show | grep DNS

.. or if the above does not work (meaning you have a “newer” Linux but not “that new” 🙂 ) use:

$ nm-tool | grep DNS

Leave a Reply

Your email address will not be published. Required fields are marked *