Re:Adblock via /etc/hosts
by sergiotapia on Thursday February 11, 2016 @11:22PM
(#11085287)
You're suggesting renaming the hosts file to something else temporarily? I guess that would work. How quick does the operating system pick up on this change, do I need to reboot my machine for it to reload the Hosts file?
[ Parent
| on HN ]
No reboot needed. I have updated my hosts file regularly in linux, windows and macosx without needing a reboot.
Generally your browser will pick it up quickly as well. It doesn't cache host file entries in the same way as dns lookups so the effect of adding or removing is pretty much instant. I use Chrome mostly, so I am not as sure about other browsers.
No need to reboot, as soon as you change the hosts file the OS should immediately start to use the new version, the hosts file is the first thing the OS checks when resolving names, this is what enables this approach to work.
It takes immediate effect. I often have a terminal open and toggle commenting out an entry when testing something. As soon as you save it, it's good to go.
Re:Adblock via /etc/hosts
by generic_user on Thursday February 11, 2016 @11:51PM
(#11085386)
$sudo nscd -i /etc/hosts
also
$man nscd