Want to run Linux programs directly in Windows without restarting your computer or setting up a virtual machine? Now you can, thanks to WSL 2, or Windows Subsystem for Linux. This is a powerful tool from Microsoft that allows you to use your favorite Linux distributions, such as Ubuntu, directly in the Windows 10 environment.
The second version of WSL is not just an update, but a real breakthrough. It runs on a real Linux kernel, which ensures full compatibility with applications and a huge increase in speed compared to the first version. Now you can work with Docker, run servers, and use almost any tool from the Linux world without losing performance.
The installation process may seem complicated, but it is actually quite simple and consists of several clear steps. We will walk you through it, from enabling the necessary components in the system to installing your first Linux distribution. Let's get started, and very soon you will be able to enjoy all the benefits of two operating systems at once.
- Two ways to install WSL 2 in Windows 10
- Install Windows Subsystem for Linux 2 (WSL 2) in Windows 10 version 21H2
- Install Windows Subsystem for Linux 2 (WSL 2) in Windows 10 version 20H2
- 1] Enable the optional WSL feature
- 2] Install the distribution
- 3] Enable the additional feature “Virtual Machine Platform”.
- 4] Configure the installed distribution
- 5] WSL 2 kernel component update
Two ways to install WSL 2 in Windows 10
- Install WSL 2 in Windows 10 version 21H2
- Install WSL 2 in Windows 10 version 20H2
WSL 2 or Windows Subsystem for Linux 2 is an iterative update to the Windows subsystem for Linux. Being much better than WSL 1, it is obviously worth upgrading to WSL 2. The experience of installing WSL in new builds has been greatly simplified. Starting with build 20246 of Windows 10 Insiders Preview on the Dev channel, released by Microsoft today, users can install the full WSL with a single command. This guide will show you how to do this in Windows 10 version 20H2 and Windows 10 21H1 build 20246. WindowsFe (Iron) has appeared.Check which version of Windows 10 do you have installed?
Install Windows Subsystem for Linux 2 (WSL 2) in Windows 10 version 21H2
- No more copying and pasting multiple commands into PowerShell.
- No need to dig into Windows features.
- No more trips to the Store.
All you need to do to install the Windows Subsystem for Linux is:
- Open "Command Prompt, windowPowerShellorWindows Terminal as Administrator and enter the command:
and press Enter.

This will enable WSL 2, download and install the latest WSL 2 Linux kernel, and then download and install the latest version of Ubuntu LTS on WSL.
If you want to install a different Linux distribution, you have a choice. Just add a little extra information to the command before pressing Enter:
Where <DistroName> is the name of the OS you want to install. Here is a list of those currently available:
- Ubuntu
- Debian
- Kali-Linux
- openSUSE-42
- SLES-12
- Ubuntu-16.04
- Ubuntu-18.04
- Ubuntu-20.04
For example,: if you want to set Ubuntu 16.04, you must enter:
wsl –install -d Ubuntu-16.04

To update the WSL 2 kernel using the command line, run the following command:
“wsl.exe –install” will eventually be ported to existing Windows 10 service rings, making it easier for everyone to install WSL. At this time, your Windows 10 device must be on theInsiders Dev.
If you don't want to download the preview version of Windows 10 and your PC has version 2004 (20H1) or earlier installed, you can install the Windows Subsystem for Linux the old-fashioned way using the method below:
Install Windows Subsystem for Linux 2 (WSL 2) in Windows 10 version 20H2
Below are the requirements your computer must meet for WSL 2 to work properly:
- Windows 10 version 2004 (May update) or newer.
- Support – Hyper-V Virtualization.
In addition, for all Windows Subsystem for Linux 2 features to work, you will need to perform the following steps in the specified order:
- Enable the optional WSL feature.
- Install the Linux distribution.
- Enable Virtual Machine Platform – optional feature.
- Channel. Download the WSL 2 kernel update (required).
- Configure the installed distribution.
1] Enable the optional WSL feature
To install WSL, open Windows PowerShell as an administrator.
Execute the following command:
or
After the command is executed, you will be asked if you want to restart your computer. Press Y to do so immediately, or press N to restart it manually later.

Installing WSL 2 is an easy way to run real Linux right inside Windows 10 without creating a separate system. First, you need to enable support for this feature in the system, then install WSL via a command in PowerShell and select version 2. After that, all you have to do is download the Linux distribution you need from the Microsoft Store and set up your account. All this takes a little time, and then you can work with Linux commands as if you had a full-fledged system.
2] Install the distribution
You can download and install the Linux distribution you need from the Microsoft Store.
For more details, see our guide: Download a Linux distribution from the Microsoft Store

3] Enable the additional feature “Virtual Machine Platform”.
To enable the additional virtual machine platform feature, open Windows PowerShell as an administrator and run the following command:
or
If the system asks for confirmation to restart the computer, press Y to do so immediately, or N to do so later.

4] Configure the installed distribution
Finally, we need to configure the installed distribution for WSL 2.
- Open Windows PowerShell and run this command to get a list of all available WSL distributions on your computer:
- Install the desired distribution to work in WSL 2. Run the following command:
Where replace DistroName at any time, named after the distribution from the previous command.
Note: Commandwsl –set-version DistroName 1 will allow you to switch to Wsl 1.

5] WSL 2 kernel component update
- Be sure to download the Linux kernel update package from the page and install it:https://aka.ms/wsl2kernel.
-
Double-click the file.wsl_update_x64.msiand apply the update.
-
Run PowerShell as an administrator.
-
Enter the following command to make Windows Subsystem for Linux 2 the default architecture for new distributions being installed, and press Enter:
After completing these steps, your device will start using the new version of the Windows Subsystem for Linux as its default architecture.
So now you have a full-fledged Linux environment running right inside Windows. This opens the door to development, working with server applications, or simply using powerful command line tools without leaving your familiar operating system.
Keep in mind that WSL 2 is a live project that is constantly evolving. Keep an eye out for updates for both Windows and your Linux distribution via the terminal. This will give you access to new features and security improvements.
The best part is that it all works quickly and smoothly. You can easily access Windows files from Linux and vice versa, making the hybrid working environment truly convenient. Now you can confidently get started on your projects with all the advantages of both systems at your fingertips.









