Share your love
Install WSL2 on Windows 11 and Windows 10
In this guide, we want to teach you How To Install Windows Subsystem for Linux 2 (WSL2) on Windows 10 and Windows 11.
Windows Subsystem For Linux (WSL) is a tool provided by Microsoft to run Linux natively on Windows. It’s designed to be a seamless experience, essentially providing a full Linux shell that can interact with your Windows filesystem.
WSL2, which was released in early 2020, is the further development of the Windows Subsystem for Linux (WSL1).
While WSL1 provided a compatibility layer for translating code execution between Windows and Linux, WSL2 relies on the virtualization of a Linux operating system.
While the functionality of the Linux interface provided by WSL1 was limited, WSL2 uses a complete Linux kernel. Furthermore, WSL2 requires less memory than the previous version.
Steps To Install WSL2 on Windows 11 and Windows 10
To complete this guide, you must log in to your Windows Client and follow the steps below.
You can easily get WSL2 up and running on your Windows 10 and Windows 11 PC. To get the latest version, you need to be running Windows 10 version 21H1, 21H2, or 22H2, or on Windows 11 21H2 with all of the updates applied.
Install WSL2 on Windows 11 and Windows 10
In this way, you need to open your PowerShell or Command Prompt on your Windows 10 or 11 and run the following command:
wsl --install
Note: By default, WSL will enable all system features required and it will download and install Ubuntu. If you don’t want a distribution installed during setup you can add the — no-distribution option to the installation command.
When your installation is completed, restart your Windows to apply the changes.
Install WSL2 with a specific distro on Windows
If you prefer another flavor of Linux, the WSL2 command includes an option to view and select a different distro.
To install WSL with a specific distro on Windows 11 or 10, use these steps:
Type the following command to view a list of available WSL distros you can install on Windows and press Enter:
wsl --list --online
Then, use the following command to install your specific distro:
wsl --install -d DISTRO-NAME
When your installation is completed, restart your Windows to apply the changes.
After you complete the steps, the Windows Subsystem for Linux 2 components will install along with the distro of Linux you specified.
Update WSL2 kernel
To update your WSL kernel version, from your command prompt run the following command:
wsl --update
Once you complete the steps, if an update is available, it will download and install on your computer.
Set WSL2 as Default
The good thing about WSL2 is that it doesn’t replace WSL1. It just runs alongside it. This means you can run Linux installs with a combination of different versions. You’re able to set either as default as well as setting a version specifically to each Linux distro you have on your PC.
If you want everything to run on WSL2 as soon as you install it on Windows 11 or Windows 10, you can set it as the default version.
wsl --set-default-version 2
With WSL2 set as default, any Linux installs after that will use it automatically. You can easily check which version of WSL your installed Linux distros are using.
wsl --list --verbose
For more information, you can visit the WSL Documentation page.
Conclusion
At this point, you have learned to Install Windows Subsystem for Linux 2 (WSL2) on Windows 10 and Windows 11.
Hope you enjoy it.
You may be like these articles:
Change HostName on Windows Server/Client
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.