Install the Ubuntu subsystem on Windows to practice Linux basic commands

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

bfa3e85f6a021f3c2279c1342ee277b4.png

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.

04535be3b0c9281df95a4c63a516f73d.png

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.

29c8fb16524a04d0d7b346658aef5e0e.png

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:

acb76efc36a5b9d14ae82b951c0e9eeb.png

2c7385c581ab34298e047bafe29f783c.png

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:

Guess you like

Origin blog.csdn.net/qq_36502272/article/details/125419444