Configure DNS on Linux

To set or reconfigure your Linux server’s DNS server:

Open the /etc/resolv.conf configuration file:

vim /etc/resolv.conf

Set or update the name server line(s) to point to the desired DNS server(s), as shown in the example below:

nameserver 192.168.1.100
nameserver 192.168.1.101

Save the changes to apply the new DNS server configuration.

Resources: