How to change Google DNS on Linux

In the previous article, TipsMake.com showed you how to change Google DNS on a Mac. Today, let's find out how to change DNS on Linux and its distributions.

In most modern Linux distributions, DNS settings are configured via Network Manager.

  1. How to change DNS to be able to surf faster, don't worry about being blocked
  2. How to change DNS Quad9 to block malicious domain
  3. Top 7 best free antivirus software for Linux

Change server settings on Ubuntu.

1. First, you need to access System> Preferences> Network Connections.

2. Select the connection you want to configure Google Public DNS. For example:

  1. To change the settings for Ethernet connection, click the Wired tab , then select your network interface in the list (commonly called eth0).
  2. To change the settings for wireless connection, click the Wireless tab , then select the appropriate wireless network.

3. Next, click Edit, then select the IPv4 Settings or IPv6 Settings tab .

4. If the method is selected as Automatic (DHCP) , open the drop-down list and select Automatic (DHCP) addresses only. If the method is set to something else, don't change anything.

How to change Google DNS on Linux Picture 1

5. In the DNS servers field, enter Google Public DNS IP addresses, separated by commas:

  1. For IPv4: 8.8.8.8 and 8.8.4.4.
  2. For IPv6: 2001: 4860: 4860 :: 8888 and 2001: 4860: 4860 :: 8844.
  3. For IPv6-only: You can use Google Public DNS64 to replace the above IPv6 addresses.

6. Click Apply to save the changes. If you are prompted to confirm, enter your password.

7. To check if your settings are working properly, please refer to the article at the end of the article.

8. Repeat the procedure for additional network connections you want to change.

If your distribution does not use Network Manager, your DNS settings will be specified in /etc/resolv.conf.

Change DNS server settings on Debian servers.

/Etc/resolv.conf edit :

 sudo vi / etc / resolv . conf 

If any of the nameserver lines appear, write down the IP addresses for reference if needed.

Replace the nameserver lines or add the following lines:

For IPv4:

nameserver 8.8.8.8
nameserver 8.8.4.4

For IPv6:

nameserver 2001: 4860: 4860 :: 8888
nameserver 2001: 4860: 4860 :: 8844

For IPv6-only, you can use Google Public DNS64 instead of the above IPv6 address.

Save and exit.

Restart the Internet clients you are using.

Check if your settings are working properly by using the link at the bottom of the article.

Also, if you are using the DHCP client software to override the settings in the /etc/resolv.conf file, you will need to install the client by editing the client's configuration file.

Configure DHCP client software on Debian servers.

Backup /etc/resolv.conf:

 sudo cp / etc / resolv . conf / etc / resolv . conf . auto 

Edit /etc/dhcp3/dhclient.conf:

 sudo vi / etc / dhcp3 / dhclient . conf 

If there is a line containing domain-name-servers, write the IP addresses for future reference.

Replace the line containing domain-name-servers with or add the following line:

For IPv4:

 prepend domain - name - servers 8.8 . 8.8 , 8.8 . 4.4 ; 

For IPv6:

 prepend domain - name - servers 2001 : 4860 : 4860 :: 8888 , 2001 : 4860 : 4860 :: 8844 ; 

For IPv6-only, you can use Google Public DNS64 instead of the above IPv6 address.

Save and exit.

Check that your settings are working properly by referring to the article below.

The link to check for new DNS settings is correct: Instructions for checking Google DNS settings after changes

Good luck.

You can refer to: The best and fastest DNS list of Google, VNPT, FPT, Viettel, Singapore

3.6 ★ | 7 Vote

May be interested

  • How to change the keyboard layout in LinuxHow to change the keyboard layout in Linux
    all linux desktop environments make it easy for users to customize the keyboard layout according to language, region and personal preferences.
  • Instructions for changing Google DNS 8.8.8.8 8.8.4.4Instructions for changing Google DNS 8.8.8.8 8.8.4.4
    dns google 8.8.8.8 8.8.4.4 is one of the many dns users choose to use, especially to speed up access to the network or access to blocked facebook.
  • How to Change the Timezone in LinuxHow to Change the Timezone in Linux
    this wikihow teaches you how to change the time zone on a linux computer. you can change the timezone on every linux distribution by using the command line, or you can use the selection menu in the command line for different linux...
  • Why don't developers make more apps for Linux?Why don't developers make more apps for Linux?
    linux has a lot of software, but when you first switch, you may be disappointed that the operating system lacks familiar names. if you've been using linux for a while, you may also be disillusioned by certain types of software that have a relatively slow rate of change or lack of long-term support.
  • 5 ways to make Linux desktops look great5 ways to make Linux desktops look great
    various tools, tips and tweaks can be used to personalize linux desktops. use the following 5 methods to personalize your linux desktop environment.
  • How to change DNS for Ubuntu, LinuxHow to change DNS for Ubuntu, Linux
    suppose for some reason you need to change dns for ubuntu, such as to speed up the page loading process or access a website blocked by isp, ..., but don't know how to do it. refer to tipsmake's article below to learn more details.
  • 3 main types of Linux distributions that you should know3 main types of Linux distributions that you should know
    linux is a powerful open source kernel that powers servers and desktop operating systems. one cool feature of linux is that you can modify and change it to your liking, which has led to thousands of linux distributions coming out over the years.
  • The best, fastest DNS list of Google, VNPT, FPT, Viettel, SingaporeThe best, fastest DNS list of Google, VNPT, FPT, Viettel, Singapore
    dns is an abbreviated domain name system for domain name servers. currently, in addition to dns google is chosen by many people, and many different dns services also stabilize and speed up network access.
  • Linux Mint 20.2 'Uma' Released: What's Notable?Linux Mint 20.2 'Uma' Released: What's Notable?
    linux mint, one of the most popular linux distributions today, has officially released version 20.2
  • How to change Google DNS for the routerHow to change Google DNS for the router
    would you like to change google dns on your router? if the answer is yes, please follow the article below for more details.