You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

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:
    Get-AppxPackage *Ubuntu*
    
    If you see your Ubuntu distro listed here (with a 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 --list again—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:
    systeminfo | findstr /C:"System Type"
    
    You’ll see either "x64-based PC" or "ARM64-based PC".
  • If you downloaded the package for the wrong architecture, delete it, grab the matching version, and re-run Add-AppxPackage with the correct file.

3. Reset WSL Components & Reinstall

Corrupted WSL system components can block distributions from registering. Let’s reset the entire WSL stack:

  1. 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
    
  2. Restart your Windows 10 device.
  3. 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
    
  4. Restart again, then set WSL 2 as your default version:
    wsl --set-default-version 2
    
  5. 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:

  1. Rename your Ubuntu .appx file to .zip and extract it to a temporary folder (e.g., C:\Temp\Ubuntu).
  2. Inside the extracted folder, locate the rootfs directory (if you see a .rootfs.tar.gz file, extract that too to get the rootfs folder).
  3. 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
    
  4. 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

火山引擎 最新活动