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.