Windows Subsystem for Linux (WSL) allows users to run a Linux environment directly on Windows 11. Occasionally, users may encounter the error message “WSL has no installed distributions,” which can be confusing. This issue prevents you from accessing your Linux distributions and stopping your workflow.
Fortunately, fixing this error is often straightforward. With a few simple steps, you can get WSL up and running again. This guide will walk you through each step clearly and carefully.
Whether you are a beginner or have some experience with Windows and Linux, the instructions here will help you resolve the error effectively. Let’s start with some important quick notes.
By following this guide, you will understand why the error happens and how to fix it without causing further issues.
Quick Note Before You Begin
- Check your Windows version: WSL works best on Windows 11 or Windows 10 version 2004 and higher. Ensure your system is up to date.
- Verify if WSL is enabled: WSL must be enabled in Windows Features to run Linux distributions.
- Confirm internet connection: You need internet access to download or reinstall Linux distributions.
- Restart your computer: Sometimes, a simple restart can fix temporary glitches with WSL.
Step 1: Verify Installed Distributions
The first step is to check if any Linux distributions are actually installed. Open the Command Prompt or PowerShell and type the following command:
wsl --list --verbose
This command shows all installed Linux distributions along with their status. If no distributions appear, it means none are installed or registered.
If you see the error message or the list is empty, proceed to the next step to install a distribution.
Step 2: Install a Linux Distribution
WSL needs at least one Linux distribution installed to work. You can install distributions like Ubuntu, Debian, or Kali Linux from the Microsoft Store. Here’s how:
- Open the Microsoft Store on your Windows 11 device.
- Search for your preferred Linux distribution, such as Ubuntu.
- Click Get or Install to download and install it.
- Once installed, launch the distribution from the Start menu to complete the setup.
Installing a distribution registers it with WSL, resolving the “no installed distributions” error.
Step 3: Enable WSL and Virtual Machine Platform Features
WSL relies on certain Windows features to be enabled. If these are turned off, WSL cannot function properly. Follow these steps to check and enable them:
- Press Windows Key + R, type
optionalfeatures, and press Enter to open Windows Features. - Scroll down and find Windows Subsystem for Linux and Virtual Machine Platform.
- Make sure both checkboxes are selected. If they are not, check them.
- Click OK and restart your computer when prompted.
Enabling these features allows WSL to run Linux distributions correctly and helps avoid errors.
Step 4: Set WSL Version to WSL 2 (Optional but Recommended)
WSL 2 offers better performance and full system call compatibility compared to WSL 1. Sometimes, setting your distributions to use WSL 2 can fix issues. Here’s how:
- Open PowerShell as Administrator.
- Run the command to set WSL 2 as the default version:
wsl --set-default-version 2
If you already have installed distributions, you can convert them to WSL 2 by running:
wsl --set-version <distribution-name> 2
Replace <distribution-name> with the actual name, for example, Ubuntu.
This step ensures you are using the latest and most stable WSL version.
Step 5: Unregister and Reinstall Distributions (If Necessary)
If you still get the “no installed distributions” error, your existing Linux distributions might be corrupted or improperly registered. You can unregister (remove) and reinstall them safely.
Warning: Unregistering a distribution deletes all files and data within it. Back up anything important before proceeding.
- Open PowerShell.
- List installed distributions:
wsl --list
- Unregister the problematic distribution by running:
wsl --unregister <distribution-name>
Example:
wsl --unregister Ubuntu
After unregistering, reinstall the distribution from the Microsoft Store as explained in Step 2.
Alternative Method: Install WSL via Command Line
Windows 11 simplifies WSL installation with a single command. If you want to install WSL and a default Linux distribution quickly, try this method:
- Open PowerShell as Administrator.
- Run the installation command:
wsl --install
This command enables required features, installs the latest WSL kernel, and downloads Ubuntu by default. It is a quick way to set up WSL from scratch.
Frequently Asked Questions (FAQs)
Why does WSL say “no installed distributions” even after installing one?
This can happen if the distribution was not properly registered or the WSL feature is disabled. Following the steps to enable WSL and reinstall the distribution usually fixes this.
Can I install multiple Linux distributions on WSL?
Yes, you can install multiple distributions side by side and switch between them as needed.
How do I check which WSL version my distribution is using?
Use the command wsl --list --verbose to see the version associated with each distribution.
Does unregistering a distribution delete my files?
Yes, unregistering removes the distribution and all its files permanently. Always back up important data before doing this.
Is WSL available on Windows 10?
Yes, WSL is available on Windows 10 version 2004 and later, but the installation and features may differ slightly from Windows 11.
When Nothing Works
If you have followed all the steps and still experience issues, try the following:
- Run Windows Update to ensure your system is fully updated.
- Reset or repair the Microsoft Store app through Windows Settings.
- Visit the official Microsoft WSL documentation for advanced troubleshooting: Microsoft WSL Docs.
- Consider using the Windows Feedback Hub to report your issue to Microsoft.
- If comfortable, you can try resetting WSL completely by disabling and re-enabling it via Windows Features.
Conclusion
The “WSL has no installed distributions” error on Windows 11 usually occurs because no Linux distributions are installed or WSL features are disabled. By checking installed distributions, enabling necessary Windows features, and installing or reinstalling Linux distributions, you can resolve the issue quickly.
Using the command line installation and setting WSL 2 as default improves your experience. Always be careful when unregistering distributions as this deletes data. If problems persist, official Microsoft resources can provide further help.
Following this guide step-by-step will get your WSL environment working smoothly again, allowing you to enjoy the power of Linux within Windows 11.