Hosts file location in Windows 7

10,517

Solution 1

It seems this folder has some strange hidden attribute on it. I have show hidden files and folders and show protected operating system files on, and I couldn't browse to it. However if you actually type it into the address bar you can get there!

(After doing this, I now /can/ browse to it, so I can't test other folder options settings to see what makes it show up.)

EDIT: For clarity, tested on Windows 7 Ultimate x64.

Solution 2

In addition to Shinrai answer: Screen Shots at Win 7 hosts file Location

You might have the Windows Explorer Folder Options set to "Don't show hidden files, folders, or drives" which prevents you to see the hosts file.

To fix that and Show the hidden files do:

  1. Open Windows Explorer. click "Alt" button to bring up the File menu if you don't see it. Click on "Tools" and then "Folder Options..."
  2. Click on the "View" tab and enable the radio button "Show hidden files, folders, and drives"

  3. For a quick browse to the location do: Start-> Run->

    %systemroot%\system32\drivers\etc\
    
  4. Run as Administrator your file editor in order to make changes to the hosts file

Share:
10,517

Related videos on Youtube

Jonathan
Author by

Jonathan

Updated on September 17, 2022

Comments

  • Jonathan
    Jonathan almost 2 years

    I know the hosts file should be under

    C:\Windows\System32\drivers\etc\
    

    But for some reason, I don't have the etc directory there at all. In fact, I searched for "hosts" under C:\Windows and found nothing.
    I have a Windows 7 64bit installation and yes, I checked in Control Panel\Folder Options that I can see hidden files.

  • Jonathan
    Jonathan over 13 years
    I was going to try out your answer, but when I browsed there again etc was there!! Very strange behavior...
  • uxout
    uxout over 13 years
    Yeah, it's pretty wacky. I'd love to know why.
  • Overmind
    Overmind almost 8 years
    It's not actually there (in system32 or syswow64). That's a fakepath. A file manager will prove you that.