Skip to content

callmebob2016/script-host_blocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

host_blocker

Bash script for blocking / unblocking hosts in /etc/hosts

Config

Edit script file and add desired domains that should be blocked:

hosts_to_block=("facebook.com" "imdb.com" "instagram.com")

Usage

Run by: Run script providing path to hosts file and desired status as arguments:

# Add blocked domains
./host_blocker.sh /etc/hosts 1

# Remove domain blocking
./host_blocker.sh /etc/hosts 0

About

Script for blocking / unblocking hosts in /etc/hosts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages