Forum Discussion
How to install the Linux Windows Subsystem in Windows 11
Install using Command Prompt
Step 1: Start CMD with administrative privileges.
Step 2:Execute "wsl --install" command.
Step 3:Run "wsl -l -o" to list other Linux releases.
Step 4:You can install your favorite Linux distribution, use "wsl --install -d NameofLinuxDistro."
When the operation is finished, restart your PC.You can start the Linux distribution from your Start menu.
Install Using Windows Features
Step 1:Open the Start menu and type "Windows features" into the search bar and click on "Turn Windows Features On or Off".
Step 2:Tick the "Windows Subsystem for Linux" checkbox and press the “OK” button.
Step 3:When the operation is complete, you will be asked to restart your computer.
After that, use the Microsoft Store app and look for the Linux distribution you want to use.
Install the Linux distro of your choice.
Step 4:The Linux distribution can be launched from the Start menu.
- gjatkinsonCopper ContributorThanks. For me, I noticed the Command Prompt approach does not turn on the Windows Subsystem for Linux feature (at least the checkbox is not checked) and the Linux icon did not show in the file explorer, but overall installs WSL and works fine. Months after I installed using the Command Prompt approach and with active daily usage of WSL, I noticed the file explorer icon missing. Luckily simply turning on that Windows Feature seemed to correctly add the icon in the file explorer. Thanks.
- Rawson495Copper ContributorRegarding the Command Prompt approach not turning on the Windows Subsystem for Linux feature, it might be a specific issue with your system configuration. Enabling the feature through the Windows Features window should work as an alternative method.
- YarisyoyoIron ContributorDebian, Fedora and other popular linux distros are well supported by WSL.
- DanielePPCopper Contributor
Hi,
I tried to write the wsl --install comand in my cmd prompt, ( in windows 11 ) but it doesn't work , after i write wsl --install it shows a list of comands but it doesn't start the Ubuntu installation. I have already installed Docker in my PC. Could you help me please ? Thank you best wishes- EfetoborCopper Contributor
hi, DanielePP that is because you didn't specify the type of Linux you wanted, also the tutorials usally assume you know the full command so they tend to skip it to do you use this command say maybe for ubuntu ''wsl -- install -d ubuntu'', if it was red hat it would be "wsl --install -d redhat"
- Barry_BazzaBrass Contributor
According to Microsoft the single command ''wsl --install" should automatically download and install Ubuntu.
- DanielePPCopper ContributorHi, thank you !
- Salam9Copper Contributor
- YashAdhyapak5708Copper Contributor
Salam9 turn on the windows features in search bar and in that tick the virtual machine, windows subsystem Linux options and then run the command line for the installation of Linux operating system
- kaushik_acharyaCopper Contributor
I agree with Yash.
Even though howtogeek article mentions to switch on only the WIndows Subsystem for Linux feature, but the installation would prompt you to enable Virtual Machine Platform feature too.
- Barry_BazzaBrass Contributor
Download the latest package: WSL2 Linux kernel update package for x64 machines (windows.net)
Navigate to your Downloads folder and run the MSI file. 👍
- Greg4513Copper ContributorLink worked perfect! Thank you
- SheikhSheikhCopper Contributor
install at aka.ms/wsl2kernel
- drew15251Copper Contributor
ammarjaved I tried installing Ubuntu and Ubuntu 18.04 LTS. Both apps when I load them say "Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is not installed."
I tried downloading one from the command prompt and one from the Windows Store. Has anyone else experienced this problem?- Barry_BazzaBrass Contributor
drew15251 You need to enable WSL (Windows Subsystem for Linux) first!
(external link removed by moderator)
- yalooshCopper Contributor
Hello
on any command i'm running on the system, I'm getting:
ping: socket: Operation not permitted
I tried with sudu also, but nothing happen
- Fuse_EngineCopper Contributor
Hi, I want to install Kali Linux. When I enter "wsl --install -d Kali Linux", it give me: "Copyright (c) Microsoft Corporation. All rights reserved.
Usage: wsl.exe [Argument]
Arguments:
--install <Options>
Install Windows Subsystem for Linux features. If no options are specified,
the recommended features will be installed along with the default distribution.
To view the default distribution as well as a list of other valid distributions,
use 'wsl --list --online'.
Options:
--distribution, -d [Argument]
Specifies the distribution to be downloaded and installed by name.
Arguments:
A valid distribution name (not case sensitive).
Examples:
wsl --install -d Ubuntu
wsl --install --distribution Debian
--list, -l [Options]
Lists distributions.
Options:
--online, -o
Displays a list of available distributions for install with 'wsl --install'.
--help
Display usage information." So I don't know what to do. Pls help me.- Barry_BazzaBrass Contributor
- AmitB790Copper ContributorTry using "wsl --install -d kali-linux"
- Pi_punCopper Contributor
solution for this problem
- kaushik_acharyaCopper Contributor
I am unable to install WSL using the command prompt in Windows 11.
wsl --install command throws the following error:
An error occurred in the secure channel support
I checked Security section under Internet properties.
TLS 1.0, 1.1, 1.2, 1.3 all are enabled.
I searched over the internet for a solution but couldn't find any.
Pre-requisites:
Are there any pre-requisites that needs to be set before running the wsl install command in the command prompt?
Is it necessary to enable the following as a pre-requisite in the Windows Features:
- Windows Hypervisor Platform
- Windows Subsystem for Linux
I can't see any such pre-requisite mentioned in the above doc. Rather it says
This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux.
Thanks in advance.
UPDATE:
- I managed to install WSL using the alternative approach i.e., using Windows Features.
- The probable reason (I think) for the issue mentioned above in this post is because of outdated WSL2 linux kernel package which can be updated from Manual installation steps for older versions of WSL | Microsoft Learn.
- Thanks to the authors of the comments in this discussion thread whose suggestions helped me in resolving the issue.
- MikeMike1910Copper Contributor
Everything lines up and looks good but when I try to install AISLERIOT
Sudo apt install Aisleriot It looks good
Then I type Aisleriot to open NOTHING.
When I look in the search Nothing. I did Linux on several PCs but this was first Lenovo. Any thought's Thanks