This guide walks you through resolving the “Windows Subsystem for Linux has no installed distributions” error, which appears when you try to run WSL commands or launch a Linux terminal. The fix involves reinstalling or re-registering a distribution, updating WSL, and ensuring the underlying Windows features are enabled. You’ll need administrator access to your Windows machine and a stable internet connection.
What You’ll Need
- Windows 10 (version 2004 or later) or Windows 11
- Administrator privileges (to run PowerShell or Command Prompt as admin)
- Internet connection to download the Linux distribution
- Optional: a backup of any files you want to keep from existing WSL distributions
Step-by-Step
- Open an elevated terminal. Right-click the Start button and select “Windows Terminal (Admin)” or “Command Prompt (Admin)”. If prompted by User Account Control, click “Yes”.
- Check your WSL version. Run
wsl --status. If you see a message about WSL 2 requiring an update, or if the command fails, proceed to step 3. Note the default version (1 or 2) shown. - Update WSL. Run
wsl --update. This ensures you have the latest WSL engine, which often fixes the “no installed distributions” error. Wait for the update to complete; it may take a few minutes. - Enable required Windows features. Run the following two commands in the same admin terminal, pressing Enter after each:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartdism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
If you already have these enabled, you’ll see a message saying so—that’s fine. - Restart your computer. This is critical for the feature changes to take effect. Save any open work and reboot.
- List installed distributions. After restarting, open a normal (non-admin) terminal and run
wsl --list --onlineto see available distributions. If you get an error here, your internet connection or Microsoft Store access may be blocked—try again later or check your network. - Install a distribution. Run
wsl --install -d Ubuntu(or replaceUbuntuwith any name from the list). This downloads and installs the distribution. Follow the on-screen prompts to create a username and password when the installation finishes. - Set your default distribution (optional). If you installed more than one, run
wsl --set-default Ubuntuto make it the default when you typewsl. - Test the installation. Run
wslorwsl -l -v. You should see your distribution listed with a status of “Stopped” or “Running”. You can now launch it by typingwslor clicking its icon in the Start menu.
Common Mistakes
- Skipping the restart. The Windows features won’t activate until you reboot. If you skip it, WSL will still report no distributions.
- Running commands in a non-admin terminal. The DISM commands and
wsl --updateneed administrator rights. Right-click and choose “Run as administrator” or use Windows Terminal with the Admin tab. - Assuming an existing distribution is still registered. If you previously had a distro and it was unregistered (e.g., after a failed reset), WSL won’t show it. You need to reinstall it—there’s no way to recover the registration without the original files.
- Using an outdated Windows version. WSL 2 requires Windows 10 version 2004 or later. If you’re on an older build, update Windows first.
Tips
- Use
wsl --set-version <distro> 2to convert a WSL 1 distribution to WSL 2 for better performance and full system call compatibility. - If you have multiple distributions, give each a unique name during installation to avoid confusion.
- Keep WSL updated by running
wsl --updateperiodically—this also updates the Linux kernel. - Access your Linux files from Windows Explorer by typing
\\wsl$in the address bar—useful for backing up files. - If you’re behind a corporate proxy, set the proxy environment variables in Windows before running
wsl --update.
Troubleshooting
If the error persists after following the steps, try these in order:
- Check the Windows Subsystem for Linux Optional Feature. In the Start menu, search for “Turn Windows features on or off”. Ensure both “Windows Subsystem for Linux” and “Virtual Machine Platform” are checked. If not, check them, click OK, and restart.
- Re-register the distribution manually. If you have the distribution’s
.appxfile (usually inC:\Users\<you>\AppData\Local\Packagesor the Microsoft Store cache), you can re-register it with PowerShell:Add-AppxPackage -Path "C:\path\to\distribution.appx". Otherwise, uninstall and reinstall from the Microsoft Store. - Reset the WSL service. In an admin terminal, run
net stop wslservicethennet start wslservice. This restarts the WSL service without a full reboot. - Check for Windows updates. Go to Settings > Update & Security > Windows Update and install any pending updates. A missing cumulative update can cause WSL to fail.
- Reinstall WSL entirely. Run
wsl --shutdown, thenwsl --unregister Ubuntu(if listed), thenwsl --install -d Ubuntuagain. This wipes the distribution’s data, so back up files first. - If you’re on Windows Server or an LTSC build, WSL may not be fully supported. Consider using a virtual machine instead, or check Microsoft’s documentation for server-specific instructions.
Frequently Asked Questions
Why does WSL say “no installed distributions” even after I installed one?
This usually means the distribution wasn’t registered properly. Try wsl --install -d Ubuntu again, or check if the Windows Store installation is corrupted by resetting the app in Settings > Apps > Ubuntu > Advanced options.
Can I use WSL without the Microsoft Store?
Yes. You can download a distribution’s .appx file from the Microsoft website or use wsl --import with a rootfs tarball. However, the easiest method is still the Store.
What’s the difference between WSL 1 and WSL 2?
WSL 2 uses a real Linux kernel in a lightweight VM, offering better compatibility and performance. WSL 1 translates Linux system calls to Windows, which is faster for file I/O on Windows drives but less compatible. You can switch per distribution with wsl --set-version.
Will reinstalling a distribution delete my files?
Yes, uninstalling or running wsl --unregister removes the entire Linux filesystem. Back up important files to Windows (e.g., copy to \\wsl$\Ubuntu\home\yourname) before doing this.
How do I set a default distribution?
Run wsl --set-default <distro-name>. For example, wsl --set-default Ubuntu. This makes that distro launch when you type wsl.
Why does wsl --update fail with a network error?
This often happens behind a firewall or proxy. Try using a different network, or manually download the WSL update package from the Microsoft website and run it as an administrator.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Gemini Privacy: Data Access & Limit Settings
- How to Set Up Apple Pay on iPhone
- How to Choose a Refurbished iPhone With Years of Support
- Fix Outlook Inbox Corruption with DISM in Windows
- Voice Dictation in Google Docs: How to Use It
- Turn Off Message Notifications on Mac