Find Out DNS Server IP Address

How do I find out my DNS server IP address assiged my my ISP under Unix or Linux operating system using command prompt? How do I find preferred dns server under a Linux system?Under Unix or Linux operating systems the resolver is used (set of routines in the C library) that provide access to the Internet Domain Name System (DNS). The resolver configuration file is located at /etc/resolv.conf location and it contains information that is read by the resolver routines the first time they are invoked by a process. Use the cat command or grep command to find out your dns server addresses as follows:

cat /etc/resolv.conf

Sample output:

# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 8.8.4.4

In this example my dns server address are 8.8.8.8 and 8.8.4.4 in dot notation that the resolver should query. Currently name servers may be listed, one per keyword. If there are multiple servers, the resolver library queries them in the order listed. If no nameserver entries are present, the default is to use the name server on the local machine.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Check VPS Memory/RAM Usage with SSH

There are a few tools built-in to most Linux distros for gauging and fine-tuning your...

cPanel: Unactive License File

cPanel may spit out a "Unactive License File" error when new IP addresses or added or when your...

What is a VPS ?

VPS stands for Virtual Private Servers. VPS is an isolated server that share the hardware of a...

What are the advantages of a VPS ?

VPS gives you the functions and features and of a managed dedicated server but without the price....

What is the difference between a VPS and shared hosting?

VPS is an isolated environment with your own resources whereas in a shared hosting environment...

Powered by WHMCompleteSolution