Hosts file/View
The hosts file is a plain text file used to map host names to IP addresses. On Windows, it is located in the C:\Windows\System32\drivers\etc folder. This activity will show you how to view the hosts file.
Preparation
editTo prepare for this activity:
- Start Windows.
- Log in if necessary.
View the hosts File
editTo view the hosts file:
- Open the Start menu.
- Select All Programs.
- Select Accessories.
- Select Notepad.
- In Notepad, select File then Open.
- Navigate to C:\Windows\System32\drivers\etc.
- Change the file type to open from Text Documents (*.txt) to All Files (*.*).
- Open the hosts file.
- Read the comments in the host file. The comments begin with a # character.
- Observe the host records stored in the file. At a minimum you should find a record for 127.0.0.1 localhost.
- Close Notepad. Do not save any changes.