Quickly Find Out DNS Server IP Addresses From Linux Mint / Ubuntu Command Line

It is useful to know what DNS server IP addresses are being used by the system for troubleshooting as well as for reference.

Here is how to quickly get this information using the Linux Mint/Ubuntu terminal :

Open Terminal and type :

cat /etc/resolv.conf

Listing DNS servers IP addresses from Linux command line

This will display the IP addresses of DNS servers that are being used. What the above command does is really just list the contents of a file named resolv.conf which contains the DNS server info.The same file can be quickly edited to add or remove DNS server IP addresses using any of text editor like gedit or vi.