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/bashcd /tmpwget http://winhelp2002.mvps.org/hosts.txtrm /etc/hostsmv hosts.txt /etc/hostscat ~/.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