Setup Google DNS under Linux

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, or even

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. has address has address has address mail is handled by 10 mail is handled by 10 mail is handled by 10 mail is handled by 10

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!


, , , , , , , , , , , , , , ,

  1. No comments yet.

You must be logged in to post a comment.

  1. No trackbacks yet.
%d bloggers like this: