Skip to content

Instantly share code, notes, and snippets.

Last active August 9, 2021 15:33
What would you like to do?
/etc/hosts ad blocker
#!/usr/bin/env bash
# This script will append additional entries (from 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 - >> /etc/hosts"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment