I often see in my group that self-study test partners spend a lot of time on environment construction and installation of various software, and many of them get stuck in the first step, the installation of the virtual machine. There are a lot of problems after installation, such as starting the blue screen and so on. In fact, what I want to say is that these are detours. It is really unnecessary to spend so much time on this. It is better to spend tens of hundreds of dollars. Go buy a cloud server and practice. What if you are reluctant to spend money? Teach you to use another method to build a linux system for actual combat, that is the way to build a linux subsystem under windows.
In view of the fact that some errors may appear during the installation process, it is recommended that you execute the following commands first:
1. Open powershell as an administrator and execute the following command to install Windows subsystem support.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
If this command is not executed, the following error may appear: WslRegisterDistribution failed with error: 0x8007019e
2. Open the three functions of Hyper-V, Windows Subsystem for Linux, and virtual machine platform in your computer.
Operation steps: Control Panel->Enable or close windows function, check the above three functions.
If the above functions are not enabled, the following errors may occur during the subsequent installation process:
WslRegisterDistribution failed with error: 0x80370102
3. You also need to install a software to upgrade the WSL2 Linux kernel, otherwise the following errors may occur:
WslRegisterDistribution failed with error: 0x800701bc
Upgrade package download address:
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
After installing all of the above things, you should be prompted to restart the computer at least once. After restarting the computer, open the Microsoft Store that comes with Windows, and then enter Ubuntu to search, and then select a certain version of the system to download.
After the installation is complete, there will be a prompt for you to set the user name and password, just follow the window to enter:
At this point, a linux subsystem is installed, and then you can practice the use of common linux commands.
If you don't know how to do it, you can refer to the following video: