The Domain Name System (DNS for short) is one of the most important parts of the internet infrastructure. It converts the easy to remember domain names, into IP (and IPv6) addresses, that aren’t so friendly to the end user.
Regardless of the distribution of Linux that you are using (such as Ubuntu, CentOS, Debian, Arch, Redhat, etc), the process of determining what DNS servers are currently being used for domain name resolution is the same.
To determine what DNS servers are being used, you simply need to view the contents of the “/etc/resolv.conf” file. This can be done via a graphical editing tool such as gedit, or can easily be viewed from the command line with a simple “cat” of the file, to show the contents. The command below will outline how to determine the DNS servers in use.
Show
$ cat /etc/resolv.conf
You will end up with some output like this:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 8.8.8.8 nameserver 8.8.4.4
You may or may not have the comments at the top of the file, as that will depend on your distribution, but you should have at least one or more “nameserver” records. These will be the name server IP’s that your system will currently be using. In this example, 8.8.8.8 and 8.8.4.4.
Note that this must be an IP address, and cant be a domain name.
The post Get The Active DNS Servers On Linux appeared first on Networking HowTos.
Deploying FreePBX and Asterisk on a single Ubuntu virtual machine in a public cloud is…
Canonical and MediaTek enhance reliability, accelerate market entry and reduce Total Cost of Ownership (TCO)…
As Ubuntu 20.04 LTS (Focal Fossa) standard support ends on May 31, 2025, Azure users…
Welcome to the Ubuntu Weekly Newsletter, Issue 881 for the week of February 23 –…
Welcome back, data scientists! In my previous post, we explored how easy it is to…
In this article, we will see how to install vLLM on Linux using 4 easy…