How to Access HOSTS File in Windows 7

With the help of windows host files, operating systems are able to map, or link, IP addresses to hostnames. One of many system facilities in an operating system, hostnames address the different nodes within computer networks.

In this tutorial, we will show you how to access windows host files in windows 7.
Step 1 – Open My Computer
First of all, open up the start menu and click on “Computer”.
Click Open Computer

Step 2 – Open Windows Directory
Once the “My Computer” window opens up, enter the “C Drive”. Over there, double click on the “Windows” directory.
Go to Windows Directory

Step 3 – Open up Drivers
Now scroll down and open up the “System32” folder. Once in there, enter the “Drivers” folder.
Open up the Drivers Folder

Step 4 – Open the “Etc” Folder
In the “Drivers” folder, you will find the “etc” folder. Double click on it to open it.
Open “Etc” Drivers Folder

Step 5 – Open Host file
In this folder, you will find the host file. Right click on it and a menu will appear on the screen in front of you. Select the open option from the menu and the “open with” window will pop up. In this tutorial, we will select the notepad application in order to access the host file.
And that’s it. The host file will now be opened up. You can make the changes over there as per your preferences.
Open Host File with Notepad

Step 6 – Command Prompt for finding Host file
You can also access the host file with the command prompt. Remember to open up the command prompt as an administrator.
In the command prompt window, notice the path “Windows slash System32” already exists. Now open the driver’s directory by using the command “cd Drivers”. With that done, open up the etc directory by using the “cd etc” command. Once in the directory, you can view the contents of the directory by using the “dir” command.
Find Host File with Command prompt

Step 7 – Access Host File via Command Prompt
Over here you can see that the host file is present in this directory. To access the host file, use the “edit hosts” command.
Use Command Prompt to access Host File

Step 8 – Open Host File with command line text editor
With that done, the command line text editor opens up the host file. Over there, you can edit the settings according to your requirements.
Use command line text editor to open Host File