Last active
August 9, 2021 15:33
-
-
Save ar2pi/25d7ffc31cb1695bef557556ded182fe to your computer and use it in GitHub Desktop.
/etc/hosts ad blocker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This script will append additional entries (from http://winhelp2002.mvps.org/hosts.txt) in /etc/hosts file. | |
# run: "adblock" | |
# | |
# Notes: | |
# - A backup is created as `hosts.bk` in current working directory. | |
# | |
cp /etc/hosts hosts.bk | |
sudo sh -c "curl -sSL -o - http://winhelp2002.mvps.org/hosts.txt >> /etc/hosts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment