Unable To Edit Hosts File

Hello, I am trying to edit my host's file and have looked up certain tutorials on how to. I have made sure I have administrator privileges and have taken ownership of the file. however, when I edit it and save it says it is being used by the system. I can't terminate this process and don't think I should, thank you,

heres a video: https://youtu.be/7diBtYgyHHY
10 answers Last reply
More about unable edit hosts file
  1. Yes - hosts file editing is a bit tricky.
    Here is how I do it:
    1. copy hosts file to some of user folders (desktop also will do);
    2. edit the copy of hosts file;
    3. delete old hosts file;
    3. copy edited file back to original location.
    There will be multiple UAC confirmations during the process.
  2. SkyNetRising said:
    Yes - hosts file editing is a bit tricky.
    Here is how I do it:
    1. copy hosts file to some of user folders (desktop also will do);
    2. edit the copy of hosts file;
    3. delete old hosts file;
    3. copy edited file back to original location.
    There will be multiple UAC confirmations during the process.


    ive tried this but then this happens https://s24.postimg.org/nk2dhxm6t/Rip_me.png
  3. On which action do you get it? On delete?
    Close all browsers and file editors and try renaming the file first.
  4. SkyNetRising said:
    On which action do you get it? On delete?
    Close all browsers and file editors and try renaming the file first.


    i get this error when i try to delete the file, when i rename it i get an identical error, the system is using the file. i have also tried to close all browsers and file explorers and then delete the file but i get the same error. could it be that security software is restricting this? im not sure.
  5. Some software is using the file.
    You can run Process Explorer, press Ctrl+F, and type the filename to see a list of open handles to that file.
  6. SkyNetRising said:
    Some software is using the file.
    You can run Process Explorer, press Ctrl+F, and type the filename to see a list of open handles to that file.


    ok so i got process explorer, ran it as administrator. Then i hit control f and typed in hosts and saw what came up. i terminated all of the processes i could apart from the system which i was denied access. sorry for wasting your time or anything but thanks for helping.

    image: https://s30.postimg.org/j8rneukep/image.png
  7. Phillip Corcoran said:


    i looked at the "replace the file in the destination" picture and when i tried for my self i got an access denied message.

    picture: https://s28.postimg.org/knhnbya4d/Capture.png
  8. Go to Properties, Security, take control of the file, and edit all you want.
  9. i Finally figured out the problem, i have a firewall installed that made it impossible for me to edit my hosts file. it made the system use it 100% of the time so no malicious programs could edit it. i had to uncheck the "block hosts file" box so it would finally stop. Thanks for your help everyone :)
Ask a new question