How to block Ads (ubuntu)
Well, I just knew how to block ads (in Linux, BSD, and SolarisUnixes), so I’m going to share this with you in this short 4 steps tutorial! But before I start, for those who might ask “why would I want to block ads?” “Why should I?” for two things: to have your page loaded quickly and to not be annoyed ever again (… not really, I’ll tell the reason later on)!
Step1. Open nautilus as root.
step2. Change the directory to “/etc/” and open the text file “hosts”.
What you are going to do is that you’re going to insert URLs of ads in the text file and going to redirect that URL to localhost IP(127.0.0.1); so that when the ad wants to load it’ll search in your IP(localhost), but it is not on your PC so it’ll go like “Not Found” which also means blocking ads(you could block unwanted sites too). The good thing is that you don’t have to enter every single ad URL; cause there are some sites which helped us with this; they provided a very long list containing all those URLs(ads)! just like http://www.mvps.org. anyhow let’s continue…
Step3. Copy the list from this page and paste it in “hosts” text file.
Step4. Save the document.
Congratulations, That’s it, you’ve just blocked all the URLs that are in that list. … About what I said before a while ” to not be annoyed ever again (… not really)” the reason is that there might be some new ad sites which are not included so they will appear in your browser, but you can always add the URL to the text file 😉 … and to be honest since I’ve done that till now I haven’t seen a single ad, so enjoy and don’t worry.