๐ซ hostsctl
Hostsctl.sh allows you to control your /etc/hosts easily. you can block ads, porn, soical networks with one command.
Installation
To install it right away, type:
sudo curl -L https://git.io/vy5xx -o /usr/local/bin/hostsctl
sudo chmod +x /usr/local/bin/hostsctl
or download hostsctl.sh and run it.
Usage
run:
sudo hostsctl update
after the installation to update the hosts file.
*. Before you can start using hostsctl you need to select hosts file.
List of of hosts files
| file | by |
|---|---|
| hosts | StevenBlack/hosts |
| hosts | AdAway |
| hosts | add.2o7Net |
| hosts | add.Spam |
| hosts | SpotifyAds |
| hosts | UncheckyAds |
- Place the hosts file url in the
URLvariable inhostsctl.sh
and run hostsctl update to download the hosts file.
Examples
sudo hostsctl enable bigsite.tld # Now you have access to this site
sudo hostsctl disable bigsite.tld # Now the site pointed to 127.0.0.1
See also --help
Contributing
Any collaboration is welcome!
Thanks
- Steven Black hosts repo for inspiring me to create this.
License
On this page
Languages
Shell100.0%
GNU General Public License v3.0
Created March 19, 2017
Updated June 28, 2023

