Technology Networking & Internet

How to Block Sites in Linux

    • 1). Launch the Terminal by selecting "Applications," "Accessories" and "Terminal."

    • 2). Type the command "sudo gedit /etc/hosts" without quotations and press "Enter."

    • 3). Type the following for each website you wish to block directly below the line "127.0.0.1 localhost" using the format shown:

      0.0.0.0 www.SiteToBlock.com

    • 4). Select "File" and "Save." The websites you have added to the hosts file will now be blocked.

Leave a reply