If you share a computer or have small children you don’t want visiting certain sites, here is a way to easily block them if you are an Ubuntu user:
1) you will need to have sudo permission
2) run the following command to edit /etc/hosts – sudo gedit /etc/hosts
3) Now, under the lines:
127.0.0.1 osgood-desk localhost.localdomain
The next step is to simply add:
127.0.0.1 examplesite1.com
127.0.0.1 examplesite.com
4) Now, anytime someone tries to visit examplesite1 or examplesite2, their browser will be unable to access the site.