How to Fix WSL2 Not Working on Windows 11: Step-by-Step Solutions

Windows Subsystem for Linux 2 (WSL2) is a powerful tool that lets you run Linux inside Windows 11. However, sometimes WSL2 might stop working or fail to start properly. This can be frustrating, especially if you rely on it for development or other tasks.

Fortunately, many common issues with WSL2 can be fixed with simple troubleshooting steps. This guide will walk you through easy-to-follow solutions to get WSL2 up and running again on your Windows 11 machine.

Each step is explained in detail to help even beginners understand what to do and why it matters. By the end, you should have a clear idea of how to resolve most problems affecting WSL2.

Let’s begin by checking a few quick things before diving into the fixes.

Quick Note: Prerequisites and Initial Checks

Before applying any fixes, ensure your system meets the basic requirements for WSL2. Here are some quick checks:

  • Windows Version: WSL2 requires Windows 11 or Windows 10 version 2004 or higher. Check your version by pressing Win + R, typing winver, and pressing Enter.
  • Virtualization Enabled: WSL2 uses a lightweight virtual machine, so virtualization must be enabled in your BIOS/UEFI settings.
  • Windows Features: The “Windows Subsystem for Linux” and “Virtual Machine Platform” features must be enabled on your PC.
  • System Updates: Make sure your Windows 11 is fully updated, as updates often include fixes and improvements for WSL2.

Once these basics are confirmed, you can start troubleshooting with the steps below.

Step 1: Restart the LxssManager Service

The LxssManager service manages the WSL environment. Sometimes, this service can stop or hang, causing WSL2 to not work properly. Restarting it can fix temporary glitches.

  1. Press Win + R, type services.msc, and press Enter to open the Services app.
  2. Scroll down and find the service named LxssManager.
  3. Right-click on LxssManager and select Restart.
  4. After the service restarts, try running your WSL2 terminal again.

This simple restart often resolves minor issues by refreshing WSL’s background processes.

Step 2: Check and Enable Required Windows Features

WSL2 depends on specific Windows features to work correctly. If these features are disabled, WSL2 won’t start.

  1. Open Windows Features by pressing Win + R, typing optionalfeatures, and pressing Enter.
  2. In the list, make sure Windows Subsystem for Linux and Virtual Machine Platform are both checked.
  3. If any of them are unchecked, check the boxes and click OK.
  4. Restart your computer to apply the changes.

Enabling these features ensures WSL2 has the necessary system components to operate.

Step 3: Update the WSL2 Linux Kernel

WSL2 requires a specific Linux kernel package provided by Microsoft. An outdated or missing kernel can cause errors.

  1. Open Command Prompt or PowerShell as Administrator.
  2. Run the following command to check WSL status and kernel version:
    wsl --status
  3. If the output suggests updating the kernel, visit the official Microsoft page to download the latest WSL2 Linux kernel update package:
    https://aka.ms/wsl2kernel
  4. Install the package and restart your computer.

Keeping the Linux kernel updated ensures compatibility and improved performance for WSL2.

Step 4: Set WSL2 as Default Version

If WSL defaults to version 1, some Linux distributions may fail to run as expected. Setting WSL2 as the default version can fix this.

  1. Open Command Prompt or PowerShell as Administrator.
  2. Run the command:
    wsl --set-default-version 2
  3. This forces all new Linux distributions to use WSL2 by default.
  4. Try launching your WSL2 distro again.

This step avoids compatibility issues caused by accidentally running WSL1.

Step 5: Reinstall the Linux Distribution

If only a specific Linux distribution is not working, the issue might be with the distro installation itself.

  1. Open Settings > Apps > Installed apps.
  2. Find your Linux distribution (e.g., Ubuntu), click the three-dot menu, and choose Uninstall.
  3. After uninstalling, open the Microsoft Store, search for your preferred Linux distro, and reinstall it.
  4. Once installed, launch the distro and complete the initial setup.

Reinstalling can fix corrupted files or misconfigurations in the Linux environment.

Step 6: Reset WSL Completely (Advanced)

If none of the above steps work, resetting WSL may help. This will remove all your installed Linux distributions and any data stored inside them, so back up important files first.

  1. Open PowerShell as Administrator.
  2. Run the command to unregister all installed distros:
    wsl --unregister <DistributionName> (replace <DistributionName> with your distro name, e.g., Ubuntu)
  3. Alternatively, to see all installed distros, run:
    wsl --list
  4. After unregistering all distros, disable WSL and Virtual Machine Platform features:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Disable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
  1. Restart your PC.
  2. Re-enable the features by running:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
  1. Restart again, then reinstall your Linux distribution from the Microsoft Store.

This reset clears all WSL settings and files, offering a clean slate for troubleshooting.

FAQs

Why is WSL2 not starting on my Windows 11?

Common reasons include disabled virtualization, missing Windows features, outdated Linux kernel, or corrupted Linux distributions.

How do I check if virtualization is enabled?

Open Task Manager (Ctrl + Shift + Esc), go to the Performance tab, and check if “Virtualization” says “Enabled.” If not, enable it in your BIOS/UEFI settings.

Can I run WSL2 without enabling virtualization?

No, virtualization must be enabled because WSL2 runs inside a lightweight virtual machine.

How do I update WSL2’s Linux kernel?

Download and install the latest kernel package from Microsoft’s official link: https://aka.ms/wsl2kernel.

Will resetting WSL delete my files?

Yes, unregistering or resetting WSL removes all installed Linux distributions and their data. Always back up important data before resetting.

Is WSL1 still available on Windows 11?

Yes, WSL1 is still available but has fewer features and slower performance compared to WSL2. You can switch between versions if needed.

When Nothing Works

If you’ve tried all the steps and WSL2 still isn’t working, consider the following final options:

  • Visit the official Microsoft WSL documentation and troubleshooting page for detailed guides: https://learn.microsoft.com/en-us/windows/wsl/troubleshooting
  • Check the Microsoft Tech Community forums or Stack Overflow for similar issues and solutions.
  • Consider resetting Windows 11 as a last resort if system corruption is suspected.
  • Contact Microsoft support for personalized assistance.

Conclusion

WSL2 is an excellent tool that enhances the Windows experience by allowing Linux environments to run smoothly. When issues arise, the best approach is to start with simple fixes like restarting services and checking Windows features.

Updating the Linux kernel and ensuring virtualization is enabled are critical steps to keep WSL2 working well. Reinstalling or resetting WSL can resolve more stubborn problems, but remember to back up important data first.

With these step-by-step solutions, you should be able to troubleshoot and fix most WSL2 problems on Windows 11, ensuring a smooth and productive development environment.

Leave a Reply