Win10 unhides protected operating system files and still cannot find the hosts file solution
Today, I wanted to modify the hosts file in the Windows 10 system. At first, I thought it was hidden by the system. I unhid the protected operating system files in the folder option. However, I found that there was still no hosts file in the C: \Windows\System32\drivers\etc. folder. Copying a new hosts file to the folder had no effect. So how to solve this problem? The following installation home shares that Win10 unhides protected operating system files and still cannot find a solution to the hosts file.
Win10 cannot find the hosts file
1. First, we click the search box under Windows 10 to search for CMD, right click on the command prompt, and run as an administrator, as shown in the following figure.
2. In the command prompt window, we copy the following command and right-click in the command prompt to paste it, and then press Enter to execute it, as shown in the following figure.
for /f %P in ('dir %windir%\WinSxS\hosts /b /s') do copy %P %windir%\System32\drivers\etc & echo %P & Notepad %P
At this time, you can open the hosts file and display the hosts file in the etc folder. If anti-virus software is installed, a window may pop up that prevents the execution of commands. Please select Allow.
The above is the installation home to share the solution to Win10 ‘s unhiding protected operating system files and still unable to find the hosts file. The test method is feasible. If you remove and check the hidden protected operating system files and still cannot find the hosts file, you may wish to solve it through the above methods.