- Notepad Host File
- Cmd /k Notepad C: Windows System32 Drivers Etc Hosts
- C Windows System32 Drivers Etc Hosts
Navigate to C:WindowsSystem32driversetc using Notepad's 'Open' location option. Select 'all files' and then choose the 'hosts' file. Make necessary changes and save! Dec 23, 2013 Cannot create the C:WindowsSystem32driversetchosts file. Make sure that the path and file name are correct. In this case, type Notepad in start search and right-click on the Notepad result. I discovered and removed a W32.Gaobot virus variant this week and one thing that it appears to have left behind is a way, on startup, to overwrite the C: WINDOWS SYSTEM32 DRIVERS ETC HOSTS file. The virus modifies this file to specify URLs of web sites to whichyou are prevented access (including Symantec & McAfee, among many others). I’d like to edit the hosts file to add a static hostname to the table. Alas, Notepad can navigate only to C: Windows System32 drivers and then does not list the “etc” directory located there.
The Windows HOSTS file functions like a local copy of a DNS server, so knowing how to edit it might come in handy if you want to make custom domain redirects, block websites, or remove malicious entries set by malware. That said, you might run into permission issues and other problems when trying to make changes to this file in some versions of Windows.
The instructions in this article apply to Windows XP, Windows 7, Windows 8, and Windows 10.
How to Edit the Windows HOSTS File
In Windows 7, 8, and 10, you can't save edits to the HOSTS file unless you open it directly from Notepad or another text editor. To do so:
- Open Notepador another text editor like Notepad++.
- In the text editor, select File > Open and navigate to the HOST file location at C:WindowsSystem32driversetc.Copy and paste the path to the HOSTS file into the File name field to quickly find the folder without having to browse for it manually.
- Select Text Documents (*txt) in the bottom-right of the Open window and change it to All Files.This step is required because the HOSTS file doesn't have the .TXT file extension.
- When files appear in the folder, double click hosts to open it.
- You can now edit the HOSTS file and save any changes.
Notepad Host File
What If I Can't Save the HOSTS File?
In some versions of Windows, you don't have permission to save directly to theetc folder. If this is the case, you might see an error like this one when you try to save:
Instead, you must save the file elsewhere like the Documents or Desktop folder. After saving, go to that folder, copy the HOSTS file, and paste it directly into the location where the HOSTS file should be (C:WindowsSystem32driversetc). You'll be prompted with permission validation and will have to confirm overwriting the file.
Cmd /k Notepad C: Windows System32 Drivers Etc Hosts
If you still have trouble saving the modified HOSTS file, check the file's attributes to see if it's been marked read-only. Right-click the file and select Properties to see the attributes.
Another option is to open your text editor program as an administrator so that the permissions are already applied to the editor. Then, saving the HOSTS file over the original can be performed without having to verify your admin credentials.
If you still can't save to the HOSTS file location, you probably don't have the correct permissions to be editing files in that folder. You should be logged in under an account that has administrative rights over the HOSTS file, which you can check by right-clicking the file and going to the Security tab.
![Notepad C Windows System32 Drivers Etc Hosts Notepad C Windows System32 Drivers Etc Hosts](/uploads/1/2/6/0/126079363/684071196.jpg)
What Is the HOSTS File Used For?
The HOSTS file is the virtual equivalent of a phone company's directory assistance. Where directory assistance matches a person's name to a phone number, the HOSTS file maps domain names to IP addresses.
Entries in the HOSTS file override DNS entries maintained by the ISP. While this might come in handy for regular use, like to block ads or certain malicious IP addresses, its functions also make this file a common target of malware.
By modifying it, malware can block access to antivirus updates or force you to a malicious website. Thus, it's a good idea to check the HOSTS file periodically or at least know how to remove false entries.
C Windows System32 Drivers Etc Hosts
A much easier way to block certain domains from your computer is to use a custom DNS service that supports content filtering or blacklists.