So a few months back the owner of this blog asked me to make a Windows app for him that would auto-setup Google DNS with just a click of a button, and I did, and after trying it out on my machine, I noticed a bit of a speed difference, and I loved it, however, I have since moved back to Linux, and I have re-discovered how to set up Google DNS in Linux (namely *buntu). So I thought that I would share.
First of all, lets give a simple explanation for what DNS is for those that have no idea.
From Google’s own site (and I love this explanation)
The DNS protocol is an important part of the web’s infrastructure, serving as the Internet’s phone book: every time you visit a website, your computer performs a DNS lookup. Complex pages often require multiple DNS lookups before they start loading, so your computer may be performing hundreds of lookups a day.
Ok, so yeah, there we go, it is where your internet goes to get the IP numbers that actually run the internet, that is associated with website names, say google.com, or even therightguy.info.
Ok, so, start up a console/terminal, and type (or paste) this.
sudo nano /etc/resolv.conf
when nano starts up it may have an entry like this in it.
This is fine. We want to go to the end of this number, press enter, and type this
press enter so that it goes to a new line, and type in this…
Now we save the file (press Control + O), it will ask the save file name, just press enter, then press Control + X. This exits nano.
From here on out you may want to reboot, and after you do so, open up a terminal/console again, and type…
The output should look something like this.
google.com has address 126.96.36.199google.com has address 188.8.131.52google.com has address 184.108.40.206google.com mail is handled by 10 smtp4.google.com.google.com mail is handled by 10 smtp1.google.com.google.com mail is handled by 10 smtp2.google.com.google.com mail is handled by 10 smtp3.google.com.
If it does, then you are good, enjoy the new speed boost!
If you want to undo this, simple do the first command up top, but remove the two new lines that we added, saved the file, exit, and reboot. Voila! Back to normal!