How to change DNS for Ubuntu, Linux
There are 2 ways to change DNS for Ubuntu, either through the user interface or through Terminal. Each method has its own advantages and disadvantages.
Method 1: Change DNS for Ubuntu from the user interface
Follow the steps below to change DNS for Ubuntu from the user interface:
Step 1: First open the Ubuntu System Settings window , then find and click Network.
Step 2: The screen will now display a list of all network connections near you and the network connection you are using.
Step 3: Next find and click the settings icon, which is a cog icon, next to the network name you are connecting to.
Step 4: On the next window displayed on the screen, find and click the IPv4 tab.
Step 5: Here find and click on the DNS box , enter the DNS server address you want to use in the box.
Note: To use multiple DNS addresses, you must enter a comma between the addresses.
Step 6: Finally click Apply to apply the changes.
Method 2: Change DNS for Ubuntu through Terminal
Another way to change DNS on Ubuntu is through the Terminal command window. The advantage of this method is that it is easy to do and does not require digging into the settings like method 1 above.
The first step you need to do is add the nameserver to the dnsmasq configuration file. However, because dnsmasq is not installed on Ubuntu by default, we will have to take the additional step of installing dnsmasq. To do this thing:
Open Terminal and enter the command below:
sudo apt-get install dnsmasq
After installing dnsmasq, the next step is to run the command below to edit the DNS configuration file:
sudo nano /etc/dnsmasq.conf
On the window displayed on the screen, find the entry named " Add other nameservers here " and replace it with the DNS server address you want to use as shown below:
So above, TipsMake has just shown you 2 ways to change DNS for Ubuntu.
Besides, if you use Windows 10, you can also change DNS in the simplest way through the steps below.
You should read it
- 8 ways Ubuntu changes and improves Linux
- Tips and tricks after installing Ubuntu
- Is Arch Linux better than Ubuntu?
- Distinguish Ubuntu and Linux Mint
- Following many other Linux employees, Ubuntu stopped providing 32-bit ISO Images
- Install and use 7 ZIP on Ubuntu Linux
- 5 best Ubuntu-based Linux distributions of all time
- Why is Ubuntu LTS preferred over regular distros?
May be interested
- How to check MAC address on Linuxthe steps to find and check mac address on windows and macos are quite simple. so what about on linux? what ways are there to check mac address on linux?
- Boot and run Ubuntu from the USB driverunning an operating system on a usb drive, such as windows, is quite useful. this way you can restore data from the hard drive and copy that data to external hard drives in case the computer does not boot or scan the computer for viruses. this tipsmake article will show you how to boot and run ubuntu from a usb drive.
- What is Linux Kernel? Application functions of Linux Kernel in computer systemsthe obvious common point of linux-based operating systems is that they all have the linux kernel. so what exactly is the linux kernel? application function of linux kernel in computer system? what are the components of the linux kernel?
- What is Bash in Linux? What can it be used for?writing bash scripts is one of the best ways to increase your linux expertise, but learning it can be intimidating.
- New free malware scanning tool for Linuxsecurity firm kaspersky has just launched a new free malware scanning tool for linux called kvrt (kaspersky virus removal tool) that allows users to scan the entire system and remove malware and malicious ads. harm and other known threats.
- How to use Scrcpy to control Android on Linuxscrcpy (pronounced screen copy) is an open source application that can be used to seamlessly control and project your android device on linux.