Short answer: open PowerShell as administrator, run wsl --install and restart. That enables the required Windows features, installs the WSL 2 kernel and Ubuntu, and works on Windows 11, Windows 10 version 2004 (build 19041) and later, and Windows Server 2022 and 2025. Inside a virtual machine, WSL 2 also needs nested virtualization from the host; WSL 1 runs without a VM of its own.
wsl --install # WSL + Ubuntu, then restart Windows
wsl --list --online # distributions you can install
wsl --install -d Debian # install another one by name
wsl --list --verbose # installed distributions and their WSL versionAll commands and error codes below are from Microsoft Learn's WSL documentation (install guide, Windows Server guide, basic commands, troubleshooting and the WSL 1 vs WSL 2 comparison), read on 13.11.2026. We did not run them: our test machine is a Linux server.
Which Windows versions support wsl --install
| Windows version | How to install | WSL 2 |
|---|---|---|
| Windows 11 | wsl --install | Yes, the default |
| Windows 10 2004 (build 19041) and later | wsl --install | Yes, the default |
| Windows 10 1903 or 1909 (build 18362 or later) | Manual install steps on Microsoft Learn | Yes |
| Windows Server 2025 (Server Core too) | wsl --install | Yes, the default |
| Windows Server 2022 | wsl --install | Yes, the default |
| Windows Server 2019 | Enable the feature by hand | No: build 17763, WSL 2 needs 18362 or later |
Microsoft's server guide says wsl --install on Server 2022 and 2025 enables the optional components, downloads the latest Linux kernel, sets WSL 2 as the default and installs Ubuntu, the same as on Windows 11. For Server 2019 and Server Core before 2025 it lists a manual route. Server 2019 is build 17763, lower than the build 18362 that Microsoft names as the minimum for WSL 2 (its server guide says the WSL 2 kernel step applies only from 18362), so plan on WSL 1 there:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux, VirtualMachinePlatform
# restart, then download and unpack a distribution as the server guide describesInstall WSL step by step
- 1Run the install command as administrator
Right-click PowerShell or Windows Terminal, choose Run as administrator and enter
wsl --install. To pick the distribution right away, add it:wsl --install -d Debian. If you want WSL without any distribution yet, usewsl --install --no-distribution. - 2Restart Windows
The Virtual Machine Platform feature only works after a restart. On a remote server, make sure you can reach it again over RDP before you reboot.
- 3Create the Linux user
The first start unpacks the distribution and asks for a Linux user name and password. They are separate from your Windows account; Microsoft describes this account as the Linux administrator that can run sudo.
- 4Check the result
wsl --list --verboseshows each distribution withVERSION 2or1,wsl --statusthe default distribution and version, andwsl --versionthe version of WSL itself and its kernel.
Updating WSL: Microsoft Store and GitHub releases
WSL is no longer only a Windows component: it is serviced as an app, by default through the Microsoft Store, and its releases are published on GitHub. The FAQ notes that the old LxssManager service was replaced by WSLService when WSL moved from an inbox component to the Store version. Update it with:
wsl --update # latest version from the Microsoft Store
wsl --update --web-download # same, but downloaded from GitHub
wsl --update --pre-release # preview builds
wsl --shutdown # stop all distributions so the update appliesWhen the Microsoft Store is not reachable, use wsl --update --web-download or install the MSI from the WSL releases page, which lists the current stable and pre-release builds. Microsoft's offline route is that MSI, then dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart and a restart, then a distribution from a .wsl file.
WSL 1 vs WSL 2
| Aspect | WSL 1 | WSL 2 |
|---|---|---|
| How it works | Translation layer for Linux system calls, no VM | Real Linux kernel in a managed lightweight VM |
| Runs in a managed VM | No | Yes (Virtual Machine Platform, a subset of Hyper-V) |
| Full system call compatibility (Docker, systemd) | No | Yes |
| Speed on Linux files | Slower | Much faster (git clone, npm install, apt) |
| Speed on Windows files (/mnt/c) | Faster | Slower |
| Network | Bridged, same network as the host | NAT by default |
New installs use WSL 2. Switch one distribution with wsl --set-version Debian 1 (or 2), and the default for future installs with wsl --set-default-version 1. Microsoft recommends WSL 2 and lists a few exceptions for WSL 1, among them project files that must stay on the Windows file system, serial port access and a distribution that needs an IP address in the host's network.
WSL 2 on a Windows VPS needs nested virtualization
WSL 2 starts its own small virtual machine. On a physical PC that needs virtualization switched on in the firmware. On a Windows VPS or any other virtual machine, Windows is already a guest, so WSL 2 can only start if the host passes the CPU's virtualization extensions through to it. That is called nested virtualization, and only the operator of the host can turn it on. On a Hyper-V host, Microsoft's troubleshooting page gives the command for the host side (with the VM switched off):
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $trueOther hypervisors have their own setting for this; see what a hypervisor is for how the layers fit together. Not every virtual machine has it, so ask your provider before you plan on WSL 2 on a Windows VPS. On a dedicated server running Windows directly on the hardware, virtualization has to be enabled in the BIOS or UEFI instead.
Without nested virtualization: use WSL 1
Microsoft's comparison lists WSL 1 without a managed VM and without a Linux kernel of its own, so it does not depend on nested virtualization; that is our reading of the docs, Microsoft makes no statement about VPS guests. The --enable-wsl1 switch makes the install also enable the "Windows Subsystem for Linux" optional component that WSL 1 needs:
wsl --install --no-distribution --enable-wsl1
# restart, then:
wsl --set-default-version 1
wsl --install -d Debian
wsl --list --verbose # VERSION should show 1You get a working Linux shell with apt, ssh, git and most command-line tools. What does not work under WSL 1 is anything that needs a real Linux kernel, such as Docker Engine or systemd services. For those, a small Linux VPS reached over SSH from Windows is often simpler than WSL.
Common WSL install errors
| Error | Meaning | Fix |
|---|---|---|
0x80370102 | The virtual machine could not be started because a required feature is not installed | Enable Virtual Machine Platform, virtualization in BIOS/UEFI; in a VM, nested virtualization on the host; or use WSL 1 |
0x80070003 | Distribution not on the system drive, or virtualization off | Store new content on C:, check virtualization |
0x8007019e | The WSL optional component is not enabled | Turn on Windows Subsystem for Linux in Windows Features, restart |
0x80040306 | Legacy console is on | Untick Use legacy console in the console properties |
0x80040154 | A Windows update disabled the WSL feature | Enable it again |
0x8000FFFF | Unexpected failure | Run as admin, wsl --update, wsl --shutdown; SFC /SCANNOW and DISM /Online /Cleanup-Image /RestoreHealth |
has no installed distributions | No distribution yet, or you are the built-in Administrator | wsl --install -d NAME; use your own admin account |
For 0x80370102 on a physical machine, Microsoft also lists two checks: the hypervisor must be allowed to start at boot, and VMware or VirtualBox must be versions that work alongside Hyper-V (VMware 15.5.5 or later) or be switched off:
bcdedit /enum | findstr -i hypervisorlaunchtype
bcdedit /set hypervisorlaunchtype Auto # only if the line above says Off, then restart- WSL 2 needs a CPU with Second Level Address Translation (SLAT); Microsoft names Intel Nehalem and AMD Opteron as the first generations with it.
- On an Azure VM, nested virtualization does not work while Trusted Launch is on.
wslnot recognized: the optional component is missing. On an ARM64 device the same error appears in Windows PowerShell; runwsl.exefrom PowerShell 7 or Command Prompt there.
Once WSL runs, the Linux side behaves like a normal Debian or Ubuntu install: update it with sudo apt update && sudo apt upgrade, and the Linux commands cheat sheet covers the daily commands. To move files to a server from there, use the scp command exactly as on Linux.
Frequently asked
How do I install WSL on Windows 11?
Open PowerShell as administrator, run wsl --install and restart the PC. The command enables the required Windows features, installs the WSL 2 kernel and Ubuntu. After the restart, the first start asks for a Linux user name and password.
Can I install WSL on Windows Server?
Yes. On Windows Server 2022 and 2025, including Server Core on 2025, wsl --install in an administrator PowerShell works as on Windows 11 and sets WSL 2 as the default. Windows Server 2019 needs the manual steps from Microsoft's server guide, and as build 17763 it is limited to WSL 1.
Why does WSL fail with error 0x80370102?
WSL 2 could not start its virtual machine because a required feature is missing: the Virtual Machine Platform component, virtualization in the BIOS or UEFI, or, inside a virtual machine, nested virtualization on the host. Enable what is missing and restart, or switch the distribution to WSL 1 with wsl --set-version NAME 1.
Does WSL work on a Windows VPS?
WSL 1 does not start a VM of its own, so by Microsoft's description it should not depend on nested virtualization. WSL 2 needs nested virtualization, which only the host operator can enable, so check with your provider first. Without it, install with wsl --install --no-distribution --enable-wsl1 and set wsl --set-default-version 1 before adding a distribution.