Tuesday, 5 February 2013

How to Block a Website Using the Hosts File in uBuntu

If you’ve ever wanted to block a website more comprehensively than a Firefox add on then this might be for you.

1. Hit Alt + F2 to bring up Run.
2. Type the command:
gksu gedit /etc/hosts
3. To block the website add 127.0.0.1 then the website. Tab to create the space, if you were wondering.
127.0.0.1 facebook.com
127.0.0.1 http://www.facebook.com
4. Save and you’re done. Obviously, you can always go back and remove those lines if you want to use those sites again.

No comments:

Post a Comment