When there are hosts files that cannot be edited or cannot be saved after modification, and permissions are required, etc., see the following figure:

I learned a trick, first to you:

1, win + R

2. Go to the directory where the hosts file resides:

3. How do we start to operate so as not to have permission problems? 3.1. Click the “file” button:

3.2. Enter a menu page:

3.3. Click Windows PowerShell and open it as administrator

3.4. After clicking the administrator, a window will pop up. You can click “Yes”

3.5. Enter CMD and press Enter to enter the administrator interface

3.6. Enter notepad hosts and press Enter

3.7, we have successfully opened hosts, and then can edit, paste, copy and other operations:

3.8 after saving, to be on the safe side, you open it again to see if it has been saved.

Github cannot access the solution

Making suddenly can’t access, solution as follows 1. The first through the url github.com.ipaddress.com/www.github….

  1. Modify the hosts file. In Windows, modify the C:\Windows\System32\drivers\etc\ hosts file and add the mapping between github.com and IP address to the file, as shown in the following figure

  1. After the configuration is complete, run the ipconfig/flushdns command in CMD to access github.

If the above methods still do not work, use the following solution:

1. Webmaster toolstool.chinaz.com/dnsSelect the DNS query, find the corresponding IP address for github.com, choose any one and paste 13.250.177.223 into the hosts fileAdd 13.250.177.223 github at the end* * * *

After the configuration is saved, run ipconfig /flushdns

It’s ready to open.