Modification method: 1. Open the powershell interface and execute the "notepad" command to enter the notepad interface; 2. In the menu bar, click "File" - "Open"; 3. In the pop-up window, Select to open the hosts file in the etc directory of the c drive; 4. In the editing interface, modify the hosts file and save it.
#The operating environment of this article: windows10 system, thinkpad t480 computer.
How to modify the hosts file:
First hold down the "windows x" key and select Windows Powershell (Administrator) from the menu that pops up in the lower right corner of the computer desktop
In the opened powershell interface, execute the "notepad" command, and the notepad interface will appear.
Click "File" on the Notepad interface, then click "Open" and find the path c:\windows\system32\drivers\etc\ in the pop-up window. After finding it, you can see that the directory is blank. Click Select Files in the lower right corner and click All Files.
The hosts file will appear in front of you, click on the hosts file, and then click Open in the lower right corner. The editing page of the hosts file will pop up, where you can add the IP address and host name you need.
#After adding it, you can directly press ctrl s to save, so that the Hosts file will be modified successfully.
Related recommendations:windows system
The above is the detailed content of How to modify the hosts file. For more information, please follow other related articles on the PHP Chinese website!