Written by

Question Punit · May 2, 2023

Changes to hosts file on Windows

I'm trying to update the hosts file on Windows in C:\Windows\System32\drivers\etc

I know that in Linux if you update the hosts file, you sometimes need to restart the Network Manager for the changes to take effect.

So my question is that is there a similar thing that we need to do on Windows or do the changes take effect as soon as the file is saved?

Comments

Dmitry Baranov · May 2, 2023

Usually Windows handles the changes immediately. If it doesn't, try `ipconfig /flushdns`

0
Clayton Lewis · May 2, 2023

I'm not sure it's really necessary, but I typically do this after a hosts file change:

ipconfig /flushdns

0
Punit · May 2, 2023

Thank you Dmitry and Clayton!

I was able to verify that the change went into effect immediately by trying to ping that address and verifying the IP address ping shows.

0