Since wsl --install fails after the required features are already enabled, use these supported paths:
- Confirm the OS requirement.
wsl --installrequires Windows 10 version 2004 or later (Build 19041+) or Windows 11. - Install a distro explicitly instead of the default flow.
Open PowerShell as Administrator and run:
On some Windows 10 and older setups, thewsl --list --online wsl --install -d Ubuntu-dflag is required. - If installation hangs or the normal source is failing, use web download.
wsl --install --web-download -d Ubuntu - If the one-command install path is still broken, use the manual path for older versions.
The documented manual step for WSL 2 is to enable Virtual Machine Platform and restart:
That feature is already enabled in this case, so the next step is to continue with the manual installation flow from the WSL install documentation.dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart - If the local
wslinstall path appears broken on the machine, install WSL from the Microsoft WSL release installer. A Microsoft Q&A accepted answer for install failures such asClass not registeredrecommends installing WSL from the Microsoft GitHub WSL releases page. - If Windows optional features cannot be installed because source files are missing, repair Windows using Settings > System > Recovery > Fix problems using Windows Update > Reinstall now. That keeps files, apps, and settings.
Notes for this case:
- The required Windows features being enabled means the platform prerequisites are in place.
-
wsl --installnormally enables WSL and Virtual Machine Platform, downloads the latest Linux kernel, sets WSL 2 as default, and installs Ubuntu. - A restart is required during installation.
- How to install Linux on Windows with WSL
- Basic commands for WSL
- Manual installation steps for older versions of WSL
- Set up a WSL development environment
- Context Class not registered when cmd wsl --install - Microsoft Q&A
- Context I also can't enable "Virtual Machine Platform" feature in Windows 11 Pro 24H2 - Microsoft Q&A