|
|
|
|
|
by bru
4412 days ago
|
|
I switched from ABP to this hosts file a few months ago and I have zero regret. My browser's faster, lighter and ads are blocked just as well as with ABP. I actually even started splitting my hosts file: the layout is /etc/hosts ('compiled' version)
/etc/hosts.d/
/etc/hosts.d/aaa-warning (warning reminding me to run `update-hosts` instead of modifying /etc/hosts. Appears atop the compiled file)
/etc/hosts.d/adblock (that website's hosts file)
/etc/hosts.d/base (original system hosts file)
/etc/hosts.d/dolead (work-related file for development)
And I have the following functions in my .bashrc file: function update-hosts() {
cat /etc/hosts.d/* > /etc/hosts;
}
function update-adblock() {
curl http://someonewhocares.org/hosts/zero/hosts -o /etc/hosts.d/adblock 2> /dev/null
update-hosts
}
So if I want to update "adblock" (it is obviously an improper name) I simply do `sudo update-adblock` and if I change another file (mostly `/etc/hosts.d/dolead`) I'll just run `sudo update-hosts`.Works wonders. |
|