DNS servers are one of the most basic yet crucial parts of the internet infrastructure. Whenever you type a domain name into your browser, a DNS server translates that name into an IP (Internet Protocol) address. Your browser then uses that address to locate and connect to the site you want to visit.
Although your internet service provider automatically sets your DNS servers when you connect to the internet, their servers might not be the best choice for your needs. Here’s how you can change your DNS server on Linux. Because DNS servers, also known as name servers, are such a fundamental component of internet communication, how they are configured and perform can have a significant impact on how you use the internet.
Every time you attempt to connect to a website, slow DNS servers will result in delays. You may find up on websites you didn’t plan to visit if DNS servers are configured incorrectly. DNS servers can also be configured to prevent you from viewing particular websites by your internet service provider, the government, or another organization.
Steps to Change DNS Server on Linux
su
rm -r /etc/resolv.confnano /etc/resolv.conf
nameserver 103.86.96.100nameserver 103.86.99.100
chattr +i /etc/resolv.confreboot now
Final Words
That’s it with our article on how to Change DNS Server on Linux. A key enabler of numerous networking technologies, including mail servers, web browsing, and streaming services like Netflix and Spotify, is DNS (Domain Name System). It operates on a unique computer known as a DNS server, which maintains a database listing a number of public IP addresses and their related hostnames in order to resolve or convert hostnames to IP addresses upon user request.