0

Does anybody knows if there is an utility that enable/disable the "hosts' file"

JdeBP
  • 3,970
  • 17
  • 17

2 Answers2

4

In UNIX you can use nsswitch. Default:

hosts:          files dns

If delete files:

hosts:          dns

/etc/hosts will not work

ooshro
  • 10,874
  • 1
  • 31
  • 31
1

What OS? In windows you can rename the file using a basic batch command, or your scripting language of choice. I've also noticed that Windows will cache DNS resolution, so you'll also need to run "ipconfig /flushdns" afterwards.

DrZaiusApeLord
  • 1,174
  • 2
  • 9
  • 18