WSL Not Working on Windows 11? Quick Fix Guide
In this article
Yes – you can get Windows Subsystem for Linux (WSL) working again on Windows 11 by reinstalling the feature, resetting the Linux distribution, and confirming that hardware virtualization is enabled.
What You'll Need
- Administrator access on the Windows 11 PC
- PowerShell (or Windows Terminal) with admin rights
- Internet connection for downloading any missing components
- The name of the Linux distro you installed (e.g., Ubuntu, Debian)
- Basic comfort with command‑line commands
Step‑By‑Step
- Restart the computer. A simple reboot clears temporary glitches that often cause WSL to fail.
- Verify that the "Virtual Machine Platform" and "Windows Subsystem for Linux" optional features are enabled. Open PowerShell as administrator and run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
If the commands report that the features are already enabled, you can skip this step. - Check that hardware virtualization is turned on in the BIOS/UEFI. Reboot, enter the firmware setup (usually by pressing Del, F2, or Esc during POST), locate the setting named "Intel VT‑x", "AMD‑V", or "SVM Mode", and ensure it is enabled. Save changes and exit.
- Update WSL to the latest version. In an elevated PowerShell window run:
wsl --update
This downloads the newest WSL kernel and related components. - Set WSL 2 as the default version. Run:
wsl --set-default-version 2
If you receive an error about the virtual machine platform, repeat step 2. - List installed Linux distributions. Run:
wsl -l -v
The output shows each distro and whether it is using version 1 or 2. Note the name of the distro that is failing. - Reset the problematic distro. If the distro appears but fails to start, execute:
wsl --terminate DistroName
wsl --unregister DistroName
Replace DistroName with the exact name (e.g., "Ubuntu"). This removes the Linux file system, so back up any important data first. - Re‑install the distro from the Microsoft Store. Open the Microsoft Store, search for the distro (e.g., "Ubuntu"), click "Get" and then "Install". After installation, launch it from the Start menu and follow the initial user‑creation prompts.
- Confirm that the new installation runs. In PowerShell, run:
wsl -d DistroName --list
You should see a prompt inside the Linux shell without errors. - Optional – configure default user and default distro. To make a specific distro start automatically, run:
wsl --set-default DistroName
To change the default Linux user, follow the distro’s official documentation (usually editing~/.bashrcor usingubuntu config --default-user).
Common Mistakes
Many users try to edit the wsl.conf file before the subsystem is fully functional, which leads to confusing "cannot read file" errors. Another frequent error is forgetting to run PowerShell as an administrator; without elevated rights the dism.exe commands silently fail. Finally, disabling the "Virtual Machine Platform" after a Windows update is a hidden step that can re‑introduce the problem.
Tips
- Keep Windows 11 up to date. Major updates often include WSL improvements and bug fixes.
- If you use multiple distros, give each a distinct name to avoid confusion when running
wsl -l -v. - Store important scripts or configuration files in a Windows folder (e.g.,
C:\Users\YourName\Documents\WSL‑Backup) and mount it inside Linux (e.g.,/mnt/c/Users/YourName/Documents/WSL‑Backup) before resetting a distro. - Use the
wsl --statuscommand to quickly see the default version, kernel version, and whether the virtual machine platform is active.
Troubleshooting
If the steps above do not resolve the issue, follow this escalation path:
- Run the WSL diagnostic command. In PowerShell type:
wsl --list --verbose
Look for messages such as "WSL 2 requires virtualization" or "Kernel not found". These clues point to the next step. - Check Windows services. Open
services.mscand ensure the "LxssManager" service is running. If it is stopped, right‑click and choose "Start". Set its startup type to "Automatic". - Repair the WSL kernel package. Download the latest kernel MSI from the official Microsoft site (search for "WSL2 Linux kernel update package") and run the installer. This overwrites a corrupted kernel without affecting your distros.
- Reset the WSL optional feature. Disable and then re‑enable the feature:
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
After the second command, restart the PC. - Examine the Windows Event Viewer. Open Event Viewer (type "eventvwr" in the Run dialog). Navigate to "Windows Logs > Application" and filter for source "LxssManager". Errors here often contain a specific error code that can be searched on Microsoft Docs.
- Perform a clean reinstall of WSL. As a last resort, uninstall all Linux distros, disable the WSL feature, restart, re‑enable the feature, and then reinstall the desired distro from the Store. This removes any lingering configuration that might be corrupt.
- Contact Microsoft Support. If none of the above steps work, open the "Feedback Hub" app, select "Report a problem", and provide the diagnostic output from
wsl --status. Microsoft engineers can provide a targeted fix.
Frequently Asked Questions
Why does WSL show "0x8007019e" after a Windows update?
The error code indicates that the virtual machine platform is not active. Re‑enable the feature with dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart and restart.
Can I run Docker Desktop with WSL 2 on Windows 11?
Yes. Docker Desktop uses the WSL 2 backend automatically when the "Virtual Machine Platform" and "WSL" features are enabled. Ensure Docker is set to use the WSL 2 engine in its Settings.
What if my BIOS does not have a virtualization option?
Some older hardware lacks VT‑x/AMD‑V support, which is required for WSL 2. In that case you can still use WSL 1, but many modern Linux tools expect kernel features only available in version 2.
Is it safe to delete the Linux file system when I run wsl --unregister?
Yes, the command removes the entire distro’s root file system. Back up any files you need before running it, because the data cannot be recovered afterward.
How do I change the default WSL version for a newly installed distro?
Run wsl --set-version DistroName 2 after installation. If you want all future installs to default to version 2, execute wsl --set-default-version 2 before installing the next distro.
Why does wsl say "WSL 2 requires a newer kernel"?
This message appears when the kernel package is outdated. Running wsl --update downloads the latest kernel and resolves the mismatch.