Manually install WSL (Windows Subsystem for Linux)

BG-No more nonsense, let’s get straight to the practical stuff.

1. Install WSL
(1) Manual installation
1. Enable Windows subsystem for Linux

  • Open PowerShell as an administrator (Start menu > PowerShell > right-click > Run as administrator) and enter the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

2. Check the requirements for running WSL 2 (you can also skip this step directly)

  • For x64 systems: version 1903 or higher, build 18362.1049 or higher.
  • For ARM64 systems: version 2004 or higher, build 19041 or higher.
  • Or Windows 11.

3. Enable virtual machine function

  • Before installing WSL 2, the Virtual Machine Platform optional feature must be enabled. Your computer requires virtualization capabilities to use this feature.
    Open PowerShell as administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  • Restart the computer to complete the WSL installation and update to WSL 2.

4. Download the Linux kernel update package
(1) Download the latest package:

5. Set WSL 2 as the default version

  • Open PowerShell and run the following command to set WSL 2 as the default version when installing a new Linux distribution:
 wsl --set-default-version 2

6. Install the selected Linux distribution
(1) Open the Microsoft Store and select your preferred Linux distribution.
Clicking on the following links will open the Microsoft Store page for each distribution:

- Ubuntu 18.04 LTS
- Ubuntu 20.04 LTS
- Ubuntu 22.04 LTS
- openSUSE Leap 15.1
- SUSE Linux Enterprise Server 12 SP5
- SUSE Linux Enterprise Server 15 SP1
- Kali Linux
- Debian GNU/Linux
- Fedora Remix for WSL
- Pengwin
- Pengwin Enterprise
- Alpine WSL
- Raft (free trial version)
(2) Select "Get" on the distribution page
Insert image description here

  • When you first boot a newly installed Linux distribution, a console window will open and you will be asked to wait a minute or two for the files to be decompressed and stored on your computer.
    All future boot times should be less than a second.
  • Then, you need to create a user account and password for the new Linux distribution .

Source link: Windows Subsystem for Linux (WSL)

Guess you like

Origin blog.csdn.net/bigge_L/article/details/131792935