How To Block A Website In Ubuntu
Dear ubuntu geeks,
In this tutorial I will teach you how to block unwanted websites in Ubuntu Linux by editing the /etc/hosts file which is used to handle DNS and internet on Linux based systems.
I like very much this method because I don’t need to rely on third party applications and it is extremely easy to use. All you need to do is to make a simple change in the /etc/hosts file.
Make sure to have superuser access on the machine you are using this method, because the /etc/hosts file is owned by the root user and so it cannot not be edited by everyone.
What do you need to edit the /etc/hosts file?
root permissions and a text editor.
For this tutorial I will use my favourite text editor, vim. Ok guys, open a new terminal (CTRL+ALT+T) and run the following command to open the /etc/hosts file for editing.
Then add the following line.
Replace the domain.com with the website you want to block and after you have finished the editing process, save the file and quit.
Now it is time to test if the method has worked or not. Try to access the website you blocked.
My cousin is addicted to the facebook social network so every time he find my laptop, he opens it and goes to facebook.com to chat with his friends.
What should I do?
I edit the /etc/hosts file and act like the website he is trying to reach is down.
You can also use this method to protect kids from adult content on the internet such as porn and horror movies.
Like us on Facebook
We need your assistance to stay live
This week Top Posts
- Top Things To Do After Installing Ubuntu 13.10 'Saucy Salamander' : Ubuntu 13.10 Saucy Salamander will be released on coming October 17th with many new salient featur...0 comments |
- News from Kaspersky Lab: Tor is protecting criminals : In a previous article I wrote a bit about Tor. Free browser, relays bouncing your IP all over the ...1 comment |
- Grive: An Unofficial, Open Source Linux Client For Google Drive : A couple of months before, we have featured a Linux client for Google Drive named Syncdrive, which w...2 comments |
- How To Access A LVM Drive / Partition in Ubuntu : Hey Guys, I installed Fedora on an external drive (LVM) recently and was trying to access it from U...0 comments |
- Adding and Deleting Cluster Resources (corosync pacemaker) : In our previous tutorial, we have shown you how to install corosync and pacemaker. We will show y...0 comments |
- Install Satis On Ubuntu Sever 13.10/13.04 : Satis is a simple static composer repository generator. It is used in any composer.json file as i...0 comments |
- Adding and Deleting Cluster Resources (corosync pacemaker)
- News from Kaspersky Lab: Tor is protecting criminals
- Install Satis On Ubuntu Sever 13.10/13.04
- How To Access A LVM Drive / Partition in Ubuntu
- How To Disable Remember Open Files in Sublime Text 3
- Install Sublime Text 3 In Fedora Easily With Fedy
- Grive: An Unofficial, Open Source Linux Client For Google Drive
- Install nSnake Game In Terminal
- How To “Fix E: Could not open file /var/lib/dpkg/status”
- Wow! Linux Foundation To Offer Free Linux Course This Summer Worth $2,400 on EdX
This work by unixmen.com is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Copyright © 2008-2013 Unixmen.com .