Share via

Windows 11 – WSL installed but wsl commands return “The system cannot find the file specified” and where wsl returns nothing

omar Elksass 0 Reputation points
2026-02-28T23:54:54.18+00:00

I I am running Windows 11 (Version 23H2, Build 22631.6199).

I am unable to use WSL. Every wsl command returns:

The system cannot find the file specified.

Symptoms

PS C:\Windows\System32> wsl --install

Important detail:

  • where wsl returns nothing.

C:\Windows\System32\wsl.exe does not exist.

However, in Settings → System → System Components, "Windows Subsystem for Linux" is installed (Version 2.6.3.0).

Virtualization is enabled in BIOS.

I am running PowerShell as Administrator.

What I already tried

Disabled and re-enabled:

Microsoft-Windows-Subsystem-Linux

  VirtualMachinePlatform
  
  Ran:
  
DISM /Online /Cleanup-Image /RestoreHealth

Both completed successfully. SFC reported corrupted files were repaired.

Uninstalled "Windows Subsystem for Linux" from Settings.

Reinstalled WSL from Microsoft Store.

Restarted multiple times.

Result is still the same:

wsl commands fail

where wsl returns nothing


Question

How can I restore the wsl.exe system registration in Windows 11 when the Store-based WSL package appears installed but no executable is available in System32?

Is there a way to manually repair or re-register the WSL AppX package without performing a full in-place Windows repair upgrade?I am running Windows 11 (Version 23H2, Build 22631.6199).

I am unable to use WSL. Every wsl command returns:

The system cannot find the file specified.

Symptoms

PS C:\Windows\System32> wsl --install

Important detail:

where wsl returns nothing.

C:\Windows\System32\wsl.exe does not exist.

However, in Settings → System → System Components, "Windows Subsystem for Linux" is installed (Version 2.6.3.0).

Virtualization is enabled in BIOS.

I am running PowerShell as Administrator.

What I already tried

Disabled and re-enabled:

Microsoft-Windows-Subsystem-Linux

  VirtualMachinePlatform
  
  Ran:
  
DISM /Online /Cleanup-Image /RestoreHealth

Both completed successfully.
SFC reported corrupted files were repaired.

Uninstalled "Windows Subsystem for Linux" from Settings.

Reinstalled WSL from Microsoft Store.

Restarted multiple times.

Result is still the same:

wsl commands fail

where wsl returns nothing


Question

How can I restore the wsl.exe system registration in Windows 11 when the Store-based WSL package appears installed but no executable is available in System32?

Is there a way to manually repair or re-register the WSL AppX package without performing a full in-place Windows repair upgrade?

Windows for home | Windows 11 | Apps
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Lychee-Ng 15,155 Reputation points Microsoft External Staff Moderator
    2026-03-03T11:26:19.9366667+00:00

    Hi omar Elksass,

    Welcome to Microsoft Q&A!

    I’m sorry to hear that the wsl failed and returned nothing. I know it can be confusing to see the feature installed but still reported missing. This is because on Windows 11 (23H2), WSL is split into two parts:

    • A Windows OS component that provides wsl.exe in C:\Windows\System32
    • A Microsoft Store–delivered WSL package (kernel, services, userland)

    To make it quick for you, there is no supported way to manually restore, re‑register, or recreate wsl.exe when it is missing. Microsoft does not provide a standalone installer or a method to add the binary back into System32.

    Once DISM and SFC have already been run and it is still missing, the Windows component store is considered in an unrecoverable servicing state for this feature. Here are your options (keeping your files, and apps):

    1. Use built-in repair option
      1. Open Settings > System > Recovery > Fix problems using Windows Update
      2. Click Reinstall now > follow the onscreen instructions to reinstall Windows.
    2. Perform an in-place upgrade:
      1. Refer to Reinstall Windows with the installation media - Microsoft Support
      2. Navigate to the bottom of the page and expand In-place Upgrade
      3. You can also check out the instructions from one of the Moderators here: How to run In-place upgrade in Windows 11 - Microsoft Q&A
    3. Or in Recovery > choose Reset PC (Note: this solution let you keep only files, you'll need to reinstall apps.)

    Disclaimer: Both Windows reinstallation and in-place upgrade will refresh your Windows files and operating system without removing files or applications. That being said, we always recommend that if you have important data, you should back it up first before making large system changes.

    TL;DR: this is not a configuration issue and not something further commands can fix. Microsoft does not support manual placement, and a Windows repair/reset is required.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Q&A Assist
    2026-02-28T23:55:12.8933333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The behavior indicates a broken Windows-side WSL installation (missing wsl.exe in System32) rather than a problem with the Store-delivered WSL package or the Linux distros themselves. The provided context does not include a supported procedure to manually re‑register wsl.exe or the WSL AppX package when the binary is missing from C:\Windows\System32.

    The only documented recovery paths in the context for WSL/Windows corruption are:

    1. Repair WSL and Windows components
      • Confirm the WSL optional feature is enabled:
             Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
        
        If it is disabled, enable it and reboot.
      • Run:
             wsl.exe --update
        
        (When wsl.exe is present.)
      • Inside each distro, update userland:
             apt-get update | apt-get upgrade
        
    2. If enabling the feature fails or Windows is in a bad install state
      • The guidance for similar “referenced assembly could not be found”/bad‑state issues is to:
        1. Try enabling WSL via Turn Windows features on or off (GUI) instead of PowerShell.
        2. Fully update Windows via Settings → Windows Update → Check for updates.
        3. If the system remains in a bad state and WSL is needed, perform an in‑place reinstall of Windows while keeping apps and files (Reset/Repair install with “Keep everything”).
    3. When corruption persists after DISM/SFC
      • For Windows Update/servicing corruption that DISM and SFC cannot fully resolve, the recommended fix in the context is again a repair install / reset of Windows that keeps personal files and apps, then re‑enable WSL and reinstall the Store WSL package.

    Given the constraints in the context, there is no documented, supported way here to manually re‑register wsl.exe or the WSL AppX package when the System32 binary is missing. The supported remediation path is to:

    1. Verify and re‑enable the Windows Subsystem for Linux optional feature via GUI.
    2. Fully update Windows.
    3. If wsl.exe is still missing, perform a repair/Reset this PC with “Keep my files” (or equivalent in‑place reinstall), then re‑install WSL from the Store and re‑enable the feature.

    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.