5 ms·
$man mv
by Scarbutt 11y ago
$man mv
- sergiotapia 11y agoYou'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?
- singlow 11y agoNo 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.
- Scarbutt 11y agoNo 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.
- generic_user 11y ago$sudo nscd -i /etc/hosts also $man nscd
- vacri 11y agoIt 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.
- johnchristopher 11y agoKeep in mind that Firefox has its own DNS cache and that has confused me more than once.
- derFunk 11y agoSoe does Chrome. You can clear the internal cache by visiting chrome://net-internals/#dns