You can Watch all our Tutorials and Training Videos for Free on ourYouTube Channel

How Do I Check My DNS Settings in Linux?

How Do I Check My DNS Settings in Linux, ?, linux dns server, linux dns server configuration, simple dns server linux, configure dns, DevOps, DNS
How Do I Check My DNS Settings in Linux

In Linux, the Domain Name System (DNS) settings play a crucial role in network connectivity. DNS settings translate human-readable domain names into IP addresses, allowing computers to access websites and resources on the internet. Therefore, it is essential to check the DNS settings in Linux to ensure that your system can connect to the internet and resolve domain names correctly.

This article will guide you through the process of checking your DNS settings in Linux using various methods.

Method 1: Using the Terminal

  1. Open the terminal by pressing Ctrl+Alt+T or searching for "Terminal" in the applications menu.

  2. Type the following command to display your current DNS settings:

cat /etc/resolv.conf
  1. The output will show your current DNS server IP addresses under the "nameserver" field. For example:

In this example, the DNS server IP addresses are "" and "," which are the Google Public DNS servers.

Method 2: Using the Network Manager GUI

  1. Click on the network icon on the top-right corner of the screen.

  2. Select "Settings" to open the Network Manager GUI.

  3. Click on the gear icon next to your current network connection and select "IPv4" from the drop-down menu.

  4. In the "DNS" section, you can view and edit your current DNS server addresses. You can also add new DNS servers by clicking on the plus (+) sign.

  5. Once you have made changes to your DNS settings, click "Apply" and close the Network Manager window.

Method 3: Using the nslookup Command

The nslookup command is a command-line tool used to query DNS servers and resolve domain names to IP addresses. You can use the nslookup command to check your DNS settings as follows:

  1. Open the terminal and type the following command:
  1. The output will show the IP address of the domain name you entered, as well as the DNS server that was used to resolve the address. For example:

Non-authoritative answer:

In this example, the DNS server used to resolve "" is "," which is the first DNS server in the "resolv.conf" file.

Checking your DNS settings in Linux is a simple process that can help you troubleshoot network connectivity issues and ensure that your system can access websites and resources on the internet. You can use various methods to check your DNS settings, including using the terminal, Network Manager GUI, and the nslookup command.

Related Searches and Questions asked:

  • How Do I List My DNS Servers?
  • How Do I Find My Current DNS Server in Ubuntu?
  • How to Add TXT Record to DNS Configuration in Linux?
  • How to Add DNS Records in Linux?
  • That's it for this post. Keep practicing and have fun. Leave your comments if any.

    Cookie Consent
    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
    It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
    AdBlock Detected!
    We have detected that you are using adblocking plugin in your browser.
    The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
    Site is Blocked
    Sorry! This site is not available in your country.
    whatsapp logo