Block unwanted advertisements with /etc/hosts file on Linux
Now we will make the shell script.
run:
vi /root/update_hosts.sh
Fill the file with the following:
#!/bin/bash
cd /tmp
wget http://winhelp2002.mvps.org/hosts.txt
rm /etc/hosts
mv hosts.txt /etc/hosts
cat ~/.etchosts >> /etc/hosts
Now we have to make sure the script is executable:
For Windows check this : http://winhelp2002.mvps.org/chmod +x update_hosts.sh
./update_hosts.sh
Comments
Post a Comment