How to Install WSL on Windows 11 (and Fix It When It Fails)

Windows 11SystemSetupApps

The Problem

WSL — the Windows Subsystem for Linux — runs a real Linux kernel inside Windows 11, so you get bash, apt, and Linux tooling without dual-booting or setting up a virtual machine by hand. On a current build the whole installation is one command.

It fails for a small, predictable set of reasons: hardware virtualization is switched off in firmware, the two optional Windows features it depends on are not enabled, or the WSL kernel component is out of date. Each has a distinct error code, and the codes below tell you which one you have.

Want a full virtual machine with its own desktop instead? That is a different tool — see how to enable Hyper-V in Windows 11.

Symptoms

  • wsl --install reports the command is not recognised.
  • Installation stops with 0x80370102 — the virtual machine could not be started.
  • WslRegisterDistribution failed with error: 0x800701bc — the WSL 2 kernel needs updating.
  • 0x8007019e — the Windows Subsystem for Linux feature is not enabled.
  • Ubuntu installs but the terminal closes immediately on launch.

Step 1: Check the Requirements

  1. Press Windows + R, type winver, press Enter. You need Windows 11 (any build) or Windows 10 build 19045 or later.
  2. Open Task ManagerPerformanceCPU and look for Virtualization: Enabled at the bottom right. If it says Disabled, fix that first — go to Step 4.
  3. WSL needs a 64-bit CPU with virtualization support. Every processor sold in the last decade qualifies.
  4. Check your specs if unsure: how to check your PC specs.
  5. Windows 11 Home is fully supported. Unlike Hyper-V, WSL does not require Pro.

Step 2: Install With One Command

  1. Right-click StartTerminal (Admin).
  2. Run:
    wsl --install
    
  3. This enables both required features, downloads the Linux kernel, sets WSL 2 as the default, and installs Ubuntu.
  4. Restart the PC when it tells you to — the installation is not finished until you do.
  5. After the reboot, an Ubuntu window opens and asks you to create a username and password. The password is for Linux sudo and is unrelated to your Windows account. Nothing appears as you type it; that is normal for Linux.

Step 3: Enable the Features Manually If That Failed

If wsl --install is not recognised, or you saw 0x8007019e, turn the features on directly.

  1. Press Windows + R, type optionalfeatures, press Enter.
  2. Tick Windows Subsystem for Linux and Virtual Machine Platform. Leave Hyper-V alone — WSL does not need the full role.
  3. Click OK and restart.
  4. Or from Terminal (Admin):
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    
  5. Restart, then run wsl --install again.

Step 4: Enable Virtualization in Firmware

Error 0x80370102 means the CPU's virtualization extensions are switched off. This is a firmware setting, not a Windows one.

  1. Enter firmware setup: how to enter BIOS or UEFI.
  2. Look for Intel Virtualization Technology / VT-x on Intel boards, or SVM Mode on AMD boards — usually under Advanced, CPU Configuration, or Security.
  3. Set it to Enabled, save, and exit.
  4. Confirm in Task ManagerPerformanceCPU that Virtualization now reads Enabled.
  5. Full walkthrough including where each vendor hides it: how to enable virtualization (VT-x / AMD-V) in the BIOS.

Step 5: Update the WSL Kernel

Error 0x800701bc means the kernel component is missing or old.

  1. In Terminal (Admin):
    wsl --update
    
  2. Then set the default version explicitly:
    wsl --set-default-version 2
    
  3. If wsl --update fails, download the WSL2 Linux kernel update package from Microsoft's official documentation and run the installer.
  4. Check what you have with:
    wsl --version
    

Step 6: Choose and Install a Distribution

  1. List what is available:
    wsl --list --online
    
  2. Install a specific one:
    wsl --install -d Ubuntu-24.04
    
  3. Debian, Kali, openSUSE, and Oracle Linux are all available the same way.
  4. See what you already have installed, and which version each uses:
    wsl --list --verbose
    
  5. Convert an older WSL 1 distribution to WSL 2:
    wsl --set-version Ubuntu 2
    

Step 7: Fix the Remaining Common Errors

  1. "The requested operation could not be completed due to a virtual disk system limitation" — the distribution's virtual disk is in a compressed or encrypted folder. Right-click the folder → PropertiesAdvanced → untick Compress contents to save disk space.
  2. Terminal opens and closes instantly — reset the distribution: SettingsAppsInstalled apps → the distro → Advanced optionsReset. This erases its files, so export first (Step 8).
  3. No internet inside WSL — restart the subsystem from Terminal:
    wsl --shutdown
    
    Then reopen it. If DNS is still broken, a VPN is usually the cause; disconnect and retry.
  4. Conflicts with VirtualBox or VMware — older versions cannot share the hypervisor with WSL 2. Update them to a current release. Related: fix error 0x80004005.
  5. Memory integrity blocking itWindows SecurityDevice securityCore isolation details. Try turning Memory integrity off, reboot, and retest.

Step 8: Learn the Handful of Commands Worth Knowing

  1. Reach your Windows files from inside Linux at /mnt/c/Users/<yourname>.
  2. Reach your Linux files from Windows by typing \\wsl$ into File Explorer's address bar.
  3. Stop everything cleanly — the correct way to restart WSL:
    wsl --shutdown
    
  4. Back a distribution up before doing anything risky:
    wsl --export Ubuntu D:\ubuntu-backup.tar
    
    and restore it with:
    wsl --import Ubuntu D:\wsl\Ubuntu D:\ubuntu-backup.tar
    
  5. Remove one completely:
    wsl --unregister Ubuntu
    
    ⚠️ This permanently deletes that distribution and everything in it, with no recycle bin. Export first.

What Not to Do

  • Don't edit files in \\wsl$ with Windows tools that rewrite line endings unless you mean to. Mixed CRLF and LF endings break shell scripts in confusing ways.
  • Don't store project files under /mnt/c if you care about speed. Cross-filesystem access is much slower than keeping them inside the Linux filesystem.
  • Don't run wsl --unregister to "reset" a distribution. It deletes everything. Export first.
  • Don't leave memory integrity off permanently if turning it off was only a test — it is a genuine security protection.

Still Not Working?

If virtualization is enabled in firmware, both features are on, the kernel is current, and installation still fails, check whether an employer policy or a third-party security suite is blocking the hypervisor. Repair Windows itself as a last step: how to run SFC and DISM.

Related: how to enable Hyper-V in Windows 11, how to use Task Scheduler, and how to check your PC specs.