Block a site on all browsers in Linux
Block a site on all browsers in Linux
This tutorial will help you to block a site in all browsers on Linux
Open Terminal (ALT+F2).
For Example we need to block Facebook add the following lines just after 127.0.0.1 localhost
Thats it. When you now open www.facebook.com or facebook.com You cannot access it. In Google Chrome you will get this page.
Open Terminal (ALT+F2).
Type sudo -i in the input field as shown in the picture above.
Check the Run in terminal option.
Finally click Run button.
Type your password if necessary and press enter.
Then enter the following commands.
gedit /etc/hostsYou will get Gedit Text Editor window.
For Example we need to block Facebook add the following lines just after 127.0.0.1 localhost
0.0.0.1 facebook.com
0.0.0.1 www.facebook.com
To enable back Facebook remove the lines we added from the file /etc/hosts.
0.0.0.1 facebook.com
0.0.0.1 www.facebook.com
Comments
Post a Comment