Windows 10环境下WSL 2安装异常:执行手动安装后仍提示无已安装发行版
Hey there, let’s work through this WSL 2 issue step by step. I’ve helped folks troubleshoot this exact "no installed distributions" problem before, even when following the official docs closely. Here are the most effective fixes to try:
Troubleshooting Steps for Unrecognized WSL Distributions
1. Confirm Installation & Trigger Initialization
First, let’s make sure the Ubuntu package actually deployed, and kick off the setup process that registers it with WSL:
- Open PowerShell and run this to check if the package is installed:
If you see your Ubuntu distro listed here (with aGet-AppxPackage *Ubuntu*PackageFullName), it’s installed—but it likely hasn’t been initialized yet. - Head to your Start Menu, search for "Ubuntu", and launch the app directly. The first launch will walk you through creating a Linux user account and finishing setup. Once this completes, close the app and run
wsl --listagain—it should now show up in your distribution list.
2. Check for Architecture Mismatches
A common hidden issue is downloading the wrong Ubuntu package for your Windows 10 architecture:
- Run this in PowerShell to confirm your system type:
You’ll see either "x64-based PC" or "ARM64-based PC".systeminfo | findstr /C:"System Type" - If you downloaded the package for the wrong architecture, delete it, grab the matching version, and re-run
Add-AppxPackagewith the correct file.
3. Reset WSL Components & Reinstall
Corrupted WSL system components can block distributions from registering. Let’s reset the entire WSL stack:
- Open Administrator PowerShell and run these commands to disable WSL and the Virtual Machine Platform:
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /all /norestart - Restart your Windows 10 device.
- After rebooting, re-enable the required features:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart - Restart again, then set WSL 2 as your default version:
wsl --set-default-version 2 - Reinstall your Ubuntu package with
Add-AppxPackage, then launch the app to complete initialization.
4. Manually Import the Distribution (Last Resort)
If the appx deployment still doesn’t register the distro, you can manually import the Linux filesystem directly into WSL:
- Rename your Ubuntu
.appxfile to.zipand extract it to a temporary folder (e.g.,C:\Temp\Ubuntu). - Inside the extracted folder, locate the
rootfsdirectory (if you see a.rootfs.tar.gzfile, extract that too to get the rootfs folder). - Run this command to import the distro (adjust the paths and distro name to match your setup):
wsl --import Ubuntu D:\WSL\Ubuntu C:\Temp\Ubuntu\rootfs --version 2 - Now run
wsl --list—the imported distribution should appear. You can set it as your default with:wsl --set-default Ubuntu
内容的提问来源于stack exchange,提问作者Bill Gregg




