How to change DNS settings on Linux
Running Linux and sick of the sub-par DNS name-servers that your local ISP provides you? Want to speed things up by adding Google DNS, OpenDNS or others but unsure how to do it? We can help! Follow along with this guide learn how you can change the DNS settings on Linux.
What 3rd-party DNS service should I use?
There are many different third-party DNS providers available. Many people tend to go with Google’s Public DNS service, as it has breakneck lookup speeds. There is also CloudFlare’s DNS service which claims to respect your privacy, and OpenDNS, a favorite in the enterprise space.
Don’t want to use these three services? Check out DuckDuckGo’s excellent list of alternatives!
Change DNS settings in Gnome Shell
To change the Domain Name Server settings on the Gnome Shell desktop environment, you’ll need to work within the Gnome settings app, because, in recent releases, Gnome has changed how the network applet on the panel works.
To access the settings area, open up Application Overview mode by pressing the Windows key on the keyboard. From there, write in “Settings.” Open the app that is labeled “Settings.”
Gnome Settings has quite a lot of options and settings. On the sidebar filled with settings, locate the “Network” option and select it with the mouse.
In “Network,” you’ll see your network adapters, network proxy setting options, etc. Look for the default connection you are using to access the internet and your local area network. Then, click the gear icon next to it.
Selecting the gear icon will show you all of the important settings that relate to your default internet connection. In this area, we’ll be able to tinker with how the Gnome Desktop and Network Manager set up your DNS connection.
By default, Gnome is going to use the DNS settings that your router gives it. To change these settings, click on the IPv4 tab. Then, go to the “DNS” box and turn the “Automatic” slider off.
Note: if you need to add IPv6 DNS settings, click on the IPv6 tab and repeat the process outlined for IPv4 in Gnome Shell.
Once the automatic option is disabled for the connection, you’ll be able to set your DNS settings to whatever you want. In the box, feel free to fill out whatever 3rd-party DNS settings you’d like.
When you’re done adding the DNS server details into the connection box, click “Apply” and reboot your PC. Upon logging back in, the computer will be using the new DNS settings!
Change DNS settings in other GTK desktop environments
Changing DNS settings on Linux desktop environments like Mate, XFCE and others are quite similar, as they all use the same network connection applet. Go to the desktop and click on the network icon in the panel to reveal your connections menu. Then, click the “Edit connections” option.
Clicking “Edit Connections” will open up the Network Manager connection editor. In this window, you’ll see your default network connection.
Highlight the default network connection you want to add the custom DNS settings too. Then, click the gear icon at the bottom-left area of the screen to edit the parameters of this connection.
After selecting the gear icon, you’ll see a window appear that says “Editing X Connection.” Look through this window for the “IPv4 Settings” tab and select it.
Note: if you have IPv6 DNS settings to add, click the “IPv6 Settings” tab and enter your settings in the “Additional DNS servers” box.
Find the “Additional DNS servers” box, click on it and add in your desired DNS IP addresses. Click the “Save” button when done.
Reboot your Linux PC. When it comes back online, it should be using the new Domain Name Servers you applied in Network Manager.
Change DNS settings on KDE Plasma 5
KDE Plasma 5 is vastly different from any other desktop environment on Linux (aside from LXQt,) so we’re going to go over how to change the DNS settings on this desktop environment separately. To start, click on the Ethernet icon (or WiFi icon if you use a wireless connection) in the panel, then select the gear icon to be brought to the KDE network settings area.
Select the network connection you use to access the internet on the left. Then, find the “IPv4” tab and click on it.
In the IPv4 section, find the method box and change it to “Automatic only addresses”. Then, enter your DNS connection information in the box, separating multiple IP addresses with commas.
Note: have IPv6 DNS settings to apply in the KDE Plasma desktop? Click on the “IPv6” tab in the KDE connections area. Fill out your info in the “Other DNS Servers” box.
When you’ve finished applying the settings, click “Apply” to save them to the system. Reboot your computer and re-login to complete the process. Upon login, KDE should be using the new DNS server settings.
Hey
What if I have 2 DNS lines
Primary and secondary
im Using a gnome desktop