How to Install WSL2 using DISM on Windows 10/11

preview_player
Показать описание
Windows Subsystem for Linux 2, also known as WSL 2, is the latest version of a compatibility layer that lets Windows users run a Linux/GNU environment on Windows. Through WSL 2, a Windows user can use Linux utilities, command-line, tools, and applications on Windows directly – without the need for a virtual machine setup. Designed by Microsoft for the sole purpose of working in harmony with Linux distros and enhancing overall productivity and experience, WSL 2 allows for the user to work on Windows 10 while having the luxury of developing Linux distributions.

Coming in as a successor to WSL 1, it was created to provide the user a noteworthy boost in performance and better system compatibility. WSL 2 offers a variety of improved features, the most striking of which are:
✓ Having a managed Virtual Machine (VM)
✓ Allowing for full system call ability
✓ An in-built Linux Kernel
✓ These features are the crux to what makes the switch from WSL 1 to WSL 2 a desirable experience.]

GETTING STARTED
Before we begin, you need to make sure that you have Windows 10 updated to either version 1903 with OS Build 18362 or higher (for x64 systems) or version 2004 with OS Build 19041 or higher (for ARM64 systems). You can check your Windows version by typing winver in the search box next to the Start.

Step 1 - INITIALIZING WSL
This is a crucial step to install either version of WSL. We can initialize WSL by using simple console commands.
1. Open Start.
2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

Step 2 - INITIALIZING VM PLATFORM
Unlike WSL 1, WSL 2 uses an in-built kernel. For this reason, it requires the use of a Virtual Machine Platform.

Like what we did for WSL in step 1, we will run commands in Windows PowerShell to enable Virtual Machine Platform.

For Windows 10 (version 2004 and up):

For Windows 10 (version 1903, 1909):
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart

After completing both steps 1 and 2, it is recommended to restart your device to apply changes correctly and make sure that everything works as intended.

Step 3 - CONFIGURING WSL 2 AS DEFAULT
After restarting your device, run Windows PowerShell as an administrator and type the following command: wsl --set-default-version 2

In some cases, the console will ask you to update your WSL kernel. Once you are done installing, run the command again, and the default version should now be set to WSL 2.

Step 4 - INSTALL A LINUX DISTRO
Now that we are done with configuring WSL 2, it is time to install a Linux distro. Here you have a wide variety of options to choose from, each with its pros and cons. Currently, one of the most popular distros – Ubuntu 20.04 LTS – is an open-source OS that caught major traction in the Linux community. Other options include Kali Linux, Pengwin, and Fedora Remix for WSL, but it is a matter of preference more than anything.

Step 5 - GETTING STARTED WITH WSL 2
Having installed the distro of your choice, you can access it from the recently added icons in the Start menu. Click on the icon to open Ubuntu to start the installation process. This will take a while since it is booting up for the first time, extracting all required files and packages. Make sure not to turn off your device during this process. Once it finishes booting up, you will be prompted to enter a username and a password. Fill in a username and password that you find suitable. Having done that, you are now ready to use WSL 2.

➤ MORE INFORMATION AND RESOURCES:

#Windows11 #WSL #WSL2 #KB5004300 #DevChannel #Windows #Microsoft #MicrosoftTeams #Teams #Chat #microsoftteams #teams #chat #MicrosoftEvent #Windows11launch #windows11event #June24 #windows11upgrade #windows11features #wsl #wsl2 #windows11wsl2 #windows11linux #windows11ubuntu #linuxgui #win11 #UI #kb5004300 #21H2​​​​​​ #Build22000 #AreYouFlightingYet #Windows365 #CloudPC #Windows365Setup #Windows365Install #Windwos365releasedate
Рекомендации по теме