Monday, May 2, 2011

How to edit Hosts file on Windows 7

Windows 7 has more security to protect system files from being modified by the users with the new User Account Control feature. Although you are an administrator, you still cannot be able to edit some system files such as hosts file.

The 'hosts' file contains the mappings of IP addresses to host names. We can manually added a mapping from an IP with a custom host name by adding entry in that file.

The file location is c:\windows\system32\drivers\etc\hosts

The steps to edit the 'hosts' file on Windows 7 are described below:
1. Open an editor such as notepad as administrator, by right click on the notepad shortcut and click Run as administrator.
2. Click 'Yes' if there is warning message box. Then the notepad application will be opened.
3. Go to File menu, Open, browse the system file, and open the file.
4. Edit the file, and save.

The steps above will enable us to save the system file.

"The key is always run any editor as administrator".

No comments:

Post a Comment