just saw sparkmoods answer to this question: How to block any site? but he didn't provide enough information for me to act on his answer. I'm not sure where /etc/hosts is.
Asked
Active
Viewed 74 times
2 Answers
1
You can easily edit /etc/hosts by typing sudo gedit /etc/hosts in the terminal.
What you are doing here is exactly what people commented on your question: there is a etc folder at the root of your filesystem and there is a hosts files inside the etc folder. There is no extension to this file, it is a plain text file called hosts.
You edit it and the system knows where to go when looking for a given nameserver. So if you wanna block google you add
127.0.0.1 google.com
On your hosts file.
On a sidenote, 127.0.0.1 is an special address every IPv4 computer uses to refer to itself, which explains "localhost". Anything you point to it points to itself, therefore blocking the content.
EDIT: I'll post that to your original question.