Ubuntu provides the built-in administrative control feature to block the websites from within the operating system. This is very useful feature when you don’t want anyone to have access to certain websites through your system. If you or someone else blocked the Facebook website on your Ubuntu computer, you always have the ability the unblock this site. You just need to use the Hosts file in Ubuntu to block or unblock any website.
Steps to block Facebook/Any other Website
1. Open the terminal window by pressing
2. To install gksu type
$ sudo apt-get install gksu
3. To open a file, type
$ gksu gedit /etc/hosts
4. A file will be opened. Type “127.0.0.1 domain(you want to block) and then save.
127.0.0.1 http://www.facebook.com. This website will be blocked.
Steps to Unblock Facebook/Any other Website
gksu gedit /etc/hosts
into the Terminal Window and press “Enter”. The Hosts file will now open up in the Gedit program.
2. Scroll through the lines of text until you find the line that contains the text “facebook.com”. Delete the entire line, including the “127.0.0.1” at the beginning.
3. Save the file and your Facebook is unblocked.