How to configure DNS in Linux

DNS Configuration

  • Domain Name Service translates hostnames to network addresses.
  • Server address is specified by dhcp or in /etc/resolv.conf

    search remote.test

    There are only two settings one generally needs to remember when creating or modifying resolve.conf: search and nameserver. nameserver is the most important, as it specifies the IP address of a DNS server your system should use. Multiple nameserver lines may be added. Since servers are tried in order, be sure to put the one that is fastest and most likely to be available first.

Example: –

Adding google DNS server’s IP. Open file in vi editor.

# vi /etc/resolv.conf

How to configure DNS in Linux

adding: – nameserver

How to configure DNS in Linux

Save & close file.

Leave a Comment

%d bloggers like this: