Guides

How to install WSL on Windows 11, Windows 10 and Windows Server 2022/2025

Installing WSL takes one command: wsl --install. Steps for Windows 11, 10 and Server 2022/2025, WSL 1 vs 2, nested virtualization on a VPS and error fixes.

Published ~8 min read
On this page

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.

PowerShell (Run as administrator)
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 version

All 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 versionHow to installWSL 2
Windows 11wsl --installYes, the default
Windows 10 2004 (build 19041) and laterwsl --installYes, the default
Windows 10 1903 or 1909 (build 18362 or later)Manual install steps on Microsoft LearnYes
Windows Server 2025 (Server Core too)wsl --installYes, the default
Windows Server 2022wsl --installYes, the default
Windows Server 2019Enable the feature by handNo: 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:

PowerShell (admin) · Windows Server 2019
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux, VirtualMachinePlatform
# restart, then download and unpack a distribution as the server guide describes

Install WSL step by step

  1. 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, use wsl --install --no-distribution.

  2. 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.

  3. 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.

  4. 4Check the result

    wsl --list --verbose shows each distribution with VERSION 2 or 1, wsl --status the default distribution and version, and wsl --version the 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:

PowerShell
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 applies

When 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

AspectWSL 1WSL 2
How it worksTranslation layer for Linux system calls, no VMReal Linux kernel in a managed lightweight VM
Runs in a managed VMNoYes (Virtual Machine Platform, a subset of Hyper-V)
Full system call compatibility (Docker, systemd)NoYes
Speed on Linux filesSlowerMuch faster (git clone, npm install, apt)
Speed on Windows files (/mnt/c)FasterSlower
NetworkBridged, same network as the hostNAT 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):

PowerShell on the Hyper-V host, not inside the VM
Set-VMProcessor -VMName <VMName> -ExposeVirtualizationExtensions $true

Other 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:

PowerShell (admin) · inside a VM without nested virtualization
wsl --install --no-distribution --enable-wsl1
# restart, then:
wsl --set-default-version 1
wsl --install -d Debian
wsl --list --verbose          # VERSION should show 1

You 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

ErrorMeaningFix
0x80370102The virtual machine could not be started because a required feature is not installedEnable Virtual Machine Platform, virtualization in BIOS/UEFI; in a VM, nested virtualization on the host; or use WSL 1
0x80070003Distribution not on the system drive, or virtualization offStore new content on C:, check virtualization
0x8007019eThe WSL optional component is not enabledTurn on Windows Subsystem for Linux in Windows Features, restart
0x80040306Legacy console is onUntick Use legacy console in the console properties
0x80040154A Windows update disabled the WSL featureEnable it again
0x8000FFFFUnexpected failureRun as admin, wsl --update, wsl --shutdown; SFC /SCANNOW and DISM /Online /Cleanup-Image /RestoreHealth
has no installed distributionsNo distribution yet, or you are the built-in Administratorwsl --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:

PowerShell (admin)
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.
  • wsl not recognized: the optional component is missing. On an ARM64 device the same error appears in Windows PowerShell; run wsl.exe from 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.

Related articles

All guides