How Do I Find My DNS Server Linux?


Scott Campbell

How Do I Find My DNS Server in Linux?

When working with a Linux system, it is essential to know how to find your DNS (Domain Name System) server. The DNS server is responsible for translating domain names into IP addresses, allowing you to browse the internet and access different resources. In this tutorial, we will explore various methods to find your DNS server in Linux.

Method 1: Using the Terminal

If you prefer using the command line interface, there are a few commands you can use to retrieve the DNS server information:

  • nmcli dev show | grep ‘DNS’: This command displays the DNS server configured for your network interface(s) using NetworkManager.
  • cat /etc/resolv.conf: This command shows the contents of the resolv.conf file, which contains your system’s current DNS configuration.

If you encounter any issues with these commands or prefer a graphical method, continue reading.

Method 2: Using Network Manager GUI

The Network Manager GUI provides an easy way to manage network settings, including DNS server configuration. Follow these steps:

  1. Click on the network icon in your system tray or navigation bar to open the network menu.
  2. Select “Settings” or “Network Settings” from the dropdown menu.
  3. In the settings window, locate and click on “Network” or “Wired/Wireless Connections”.
  4. Select your active connection from the list (e.g., Ethernet or Wi-Fi).
  5. Click on “Options” or “Edit”.
  6. In the DNS section, you will find the configured DNS servers. Make a note of them for future reference.

Method 3: Using System Settings

If you are using a Linux distribution with a different network manager or desktop environment, you can often find the DNS server settings in the system settings. The steps may vary slightly depending on your distribution and desktop environment, but the general process remains similar:

  1. Open your system settings from the menu or by right-clicking on the desktop and selecting “Settings”.
  2. Navigate to the “Network” or “Connections” section.
  3. Find your active connection and click on it to view its details.
  4. In the DNS server section, you should see the configured DNS servers.


Knowing how to find your DNS server in Linux can be helpful for troubleshooting network issues or simply understanding your system’s configuration. In this tutorial, we explored three different methods to retrieve this information: using terminal commands, utilizing the Network Manager GUI, and accessing system settings. Choose the method that suits your preferences and start exploring!

Discord Server - Web Server - Private Server - DNS Server - Object-Oriented Programming - Scripting - Data Types - Data Structures

Privacy Policy