Block a site on all browsers in Linux

Read {count} times since 2020

This tutorial will help you to block a site in all browsers on Linux

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/hosts

You will get Gedit Text Editor window.
For Example we need to block Facebook add the following lines just after localhost

 That’s it. When you now open or You cannot access it. In Google Chrome you will get this page.

To enable back Facebook remove the lines we added from the file /etc/hosts.

Show Comments