In Windows 7, how does one modify the hosts file? The hosts file is a file on the computer that is used to associate the URL you accessed with the IP address for resolution. We may need to modify this file in a specific situation, in Windows XP, you can use NotePad to open the file and modify the file and save the file. However, in Windows 7, you can directly open the notepad and modify it before saving it. This is a headache. In fact, the permissions of Windows 7 are related, you can save it as follows. Method/step 1 open the "Start" menu, click "All Programs", and find "Notepad" in "attachment ". 2. Right-click notepad and select Run as administrator ". 3. A new notepad window is displayed. Click the File menu and select open ". 4. In the open dialog box, select "C: \ Windows \ System32 \ drivers \ etc" from the drop-down menu. 5. Click the file format drop-down list in the lower right corner and select "all files ". 6. The hosts file is displayed. You can double-click the hosts file to open the file and modify the file. After the modification is complete, the modification takes effect. Note: You must run the Notepad program as an administrator. Otherwise, it cannot be saved.