Score:0

Adding block list to hosts file

in flag

Ubuntu 21.04. Linux newbie here. For a few months I’ve been thinking about setting up a pi-hole to block ads. But a few days ago I read about just adding a block list to the hosts file. I wasn’t aware of this option. It sounds a lot easier than setting up a pi-hole.

I found some ad block lists here https://winhelp2002.mvps.org/hosts.htm and here https://github.com/StevenBlack/hosts/blob/master/hosts. Other quality lists I should know about?

When the block list is added to the hosts file, is that about the same as having a pi-hole? What is the advantage of a pi-hole over a block list in the hosts file?

Looks like adding the list to the hosts file is pretty easy. But I’m a newbie, so there may be some important things I don’t know. What do I need to know/do before adding a block list to my hosts file?

Yes, I’ll make a copy of my original hosts file before editing.

WinEunuuchs2Unix avatar
in flag
Your second link has all the answers to your questions. If you run into a problem then you can post a specific question. Right now your question is too broad and requires posting the READ.ME file as an answer.
Score:0
us flag

Advantage of using Pi-Hole:

  • Can be used by all other devices, not just your computer when using hosts file
  • Have a lot of options, like devices grouping, and block/whitelist rule depending on the device/group
  • Can be easily turned on/off
  • Whitelisting/blacklisting is also easy, you just see recent requests and click a button to toggle block status of individual domains
  • The important thing in Pi-Hole is you can block by regex, for example you can block *.instagram.com but if you use hosts you have to explicitly add all Instagram subdomains if you want to block them!
in flag
Thanks. I updated my hosts file and it's working well. Internet ads gone. My next step is to explore "pi-hole in a VM" https://discourse.destinationlinux.network/t/pi-hole-in-canonical-lxd-container/1337
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.