Improve your security and privacy by blocking ads, tracking and malware domains.
hBlock is a POSIX-compliant shell script that gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file, among other formats, that prevents your system from connecting to them.
hBlock is available in various package managers. Please check the PACKAGES.md file for an up-to-date list.
The latest available version can also be installed manually by running the following commands:
curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.1.0/hblock' \
&& echo '2ad4767e2e96213405e20fec15230b7f32eed239335873871d2f5ccab2ba11b5 /tmp/hblock' | shasum -c \
&& sudo mv /tmp/hblock /usr/local/bin/hblock \
&& sudo chown root:root /usr/local/bin/hblock \
&& sudo chmod 755 /usr/local/bin/hblockAdditionally, a systemd timer can be set to regularly update the hosts file for new additions.
The default behavior of hBlock can be adjusted with multiple options. Use the --help option or check the hblock.1.md file for the
full list.
Nightly builds of the hosts file, among other formats, can be found on the hBlock website.