In Linux, you can configure DNS settings using the resolv.conf file. Here's a quick guide to get you started:
-
Open a terminal.
-
Edit the resolv.conf file using a text editor:
sudo nano /etc/resolv.conf
-
Add your preferred DNS servers:
nameserver 8.8.8.8 nameserver 8.8.4.4
-
Save the changes and close the text editor.
-
To prevent overwriting, create a symbolic link:
sudo ln -sf /run/resolvconf/resolv.conf /etc/resolv.conf
-
Restart networking to apply the changes:
sudo service networking restart
That's it! Your Linux system will now use the specified DNS servers. Remember, manual changes to resolv.conf might be temporary, depending on your network management tools.