Skip to content

Instantly share code, notes, and snippets.

@marvin
Last active October 19, 2021 10:53
Show Gist options
  • Save marvin/69ac98b9e174f2a370cc9bae083d53de to your computer and use it in GitHub Desktop.
Save marvin/69ac98b9e174f2a370cc9bae083d53de to your computer and use it in GitHub Desktop.
update hosts file on ubuntu with StevenBlack Hosts-List for porn+gamblin
#!/bin/bash
# uses gambling+porn from https://github.com/StevenBlack/hosts
# can be ran via cron
cd ~
wget https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn/hosts -O /tmp/hosts
sudo sed -i '/#DELETE/Q' /etc/hosts
echo '#DELETE' | sudo tee -a /etc/hosts
cat /tmp/hosts |sudo tee -a /etc/hosts
sudo service network-manager restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment