This tutorial will explain how to block any website on Ubuntu by adding rules to /etc/hosts file.
This can be used for parent control, un-block need user password to get root privilege.

Open terminal from the dash home(or press Ctrl+Alt+T), and do following steps:

  • 1. Edit /etc/hosts file with gedit:
    sudo gedit /etc/hosts
  • 2. Add following line to block (change

    Just for example, to block, google map add following:

  • 3. Now restart your web browser and blocked sites won’t available.

To un-block them, just remove rules you added in /etc/hosts.