There are many commercial applications that enable you to block access to certain Web sites from your computer.
In this tutorial you will see how to do it in a very simple way, without installing any additional software.
Locate the file
hosts in the directory
/etc on linux:
We are about to edit the
/etc/hosts file.
Note:
(for Windows users: C: \WINDOWS\system32\drivers\etc\hosts ).
Run the following command
(as root user) to edit the file:
$ sudo nano /etc/hostsAnd bellow the line 127.0.0.1 localhost , enter:
127.0.0.2 www.facebook.comSave the file (CTRL + 0 and hit
ENTER)
The Website will be no longer available.
Note: For each additional site you wish to block just add the "
1" from the last number of
IP. For example:
127.0.0.3
www.youtube.com127.0.0.4
www.msn.comVoila!