How do I install Windows Subsystem for Linux on Windows 11?
How can I install Windows Subsystem for Linux on Windows 11? Any tutorials or guides?
The recommended way is just go to the MS store on Windows and download it, alternatively, you can run
wsl --install
in CMD or PowerShell, as administrator (quickest way there: Win+X, then A), then reboot.
That's it, MS made this super simple for Windows 11.
For more information and a detailed guide, look at this Microsoft Devblogs entry.
The recommended way to install WSL is to run this command from an administrator command prompt
wsl --install
Do not install the WSL preview from the Microsoft Store (which is NOT the recommended way) unless you would like to preview upcoming features which may or may not have been thoroughly tested (just like you can install PowerShell or PowerShell preview from the store).
If you do not specify a distribution, wsl --install
will install WSL with the default Ubuntu installation. You may want to to install a different distribution of Linux, or a LTS version of Ubuntu (One that will not automatically be upgraded to the next major release).
You can get a list of distributions by typing
wsl --list --online
The current list as of this moment is:
Name | Friendly Name |
---|---|
Ubuntu |
Ubuntu |
Debian |
Debian GNU/Linux |
kali-linux |
Kali Linux Rolling |
openSUSE-42 |
openSUSE Leap 42 |
SLES-12 |
SUSE Linux Enterprise Server v12 |
Ubuntu-16.04 |
Ubuntu 16.04 LTS |
Ubuntu-18.04 |
Ubuntu 18.04 LTS |
Ubuntu-20.04 |
Ubuntu 20.04 LTS |
If you want to install WSL with a different distribution, say Ubuntu 20.04, you would type from an administrative command prompt
wsl --install -d Ubuntu-20.04
But what if you want to install WSL and not select a distribution at all so you can "shop" for your first distro from the Microsoft Store? Installing a distro from the store without running the WSL install from the command line will not install WSL, just the distro, which won't run correctly at this point.
To get around this, from the start menu search for "turn windows features on or off" and from there you can select "Windows Subsystem for Linux". This will install WSL with no Linux distribution and then you will be able to pick your first installation from the Microsoft Store if you would like.
Microsoft's official document for installing WSL on Windows 10 and Windows 11: https://docs.microsoft.com/en-us/windows/wsl/install