WSL is saying it can't find the path specified

Pan, Dihua 5 Reputation points
2023-08-15T13:54:54.7433333+00:00

Run powershell with administrator, and then execute wsl command, but getting error "The system cannot find the path specified."

User's image

If I click the "Reset" button in Windows Subsystem for Linxu app under Apps and Features, and then execute wsl command immediately, wsl command is working, but after 2 or 3 seconds, and execute wsl command one more time, then it returns "The system cannot find the path specified." again. What's going on here, what should I do? I have tried uninstall wsl_update, removed Windows Subsystem for Linux from windows features, and then reinstalled everything, still no luck. Please help. Thanks.

Untitled

User's image

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,818 questions
{count} vote

4 answers

Sort by: Most helpful
  1. Limitless Technology 44,666 Reputation points
    2023-08-16T09:32:22.1266667+00:00

    Hello

    Thank you for your question and reaching out.

    Run with cmd administrator then type below command in each line then press Enter.

    wsl --shutdown

    wslconfig /unregister Ubuntu

    wsl --install --distribution Ubuntu

    Please Note: If you forgot the distro name, Please run 'wsl --list' from cmd line.

    --If the reply is helpful, please Upvote and Accept as answer--

    3 people found this answer helpful.

  2. Austin Taylor 0 Reputation points
    2024-11-18T04:10:42.7233333+00:00

    I fixed the issue. You have to enable virtualization in the Bios settings of your CPU under advanced.

    0 comments No comments

  3. Faxas 0 Reputation points
    2025-01-08T16:34:13.0766667+00:00

    Hello guys I tried everything, I was about to re-intall windows and then I decided to try this solution and it worked!! It seems to be the only way to fix this specific issue that i found without a clean install so I had chat gpt make a nice guide for everyone basically the solution is to unpack the .msi updater provided by windows and paste its contents inside of the C:\Windows\System32\lxss folder it worked like a charm here is a detailed guide:

    If you’ve been struggling to install or enable Windows Subsystem for Linux (WSL) and running into Error 0x8007019e, or the .msi installer for the WSL kernel gives you the dreaded "This update only applies to machines with the Windows Subsystem for Linux", you’re not alone. This issue can be particularly frustrating, and after scouring forums with no clear solution, I found a workaround that works!

    Here’s the step-by-step guide to fixing WSL when nothing else works.


    The Problem

    1. Running wsl commands always fails:
         plaintext
         Copy code
         PS C:\WINDOWS\system32> wsl --install
      

    The system cannot find the path specified.

       
       1. Attempting to enable WSL and related features using `DISM` may work, but the WSL kernel `.msi` installer gives this error:
       
       ```yaml
       plaintext
       Copy code
       This update only applies to machines with the Windows Subsystem for Linux
    
    1. Even after enabling all necessary features and installing Ubuntu from the Microsoft Store, the system fails to recognize WSL as properly installed.

    This issue seems common on Windows Insider Preview Builds (24H2), but the solution might apply to other builds as well.


    The Solution

    Here’s the step-by-step process I used to fix WSL and get Ubuntu running successfully:


    Step 1: Fully Enable WSL Features

    Open PowerShell as Administrator and disable all WSL-related features to ensure a clean state:

    powershell
    Copy code
    dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
    dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
    

    Restart your computer.

    Re-enable the required features:

    powershell
    Copy code
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    

    Restart your computer again.


    Step 2: Manually Install the WSL Kernel

    If the .msi installer for the WSL kernel still fails, use this workaround:

    Download the .msi Kernel Update:

    • Go to WSL Kernel Update Package and download the .msi file.

    Extract the .msi:

      - Use a tool like [7-Zip](https://www.7-zip.org/) to extract the `.msi` installer to a folder (e.g., `C:\WSLKernel`).
      
      **Copy Kernel Files to the Correct Location**:
      
         - Navigate to the extracted folder and locate the WSL kernel files.
         
            - Copy the kernel files to this directory:
            
            ```yaml
            plaintext
            Copy code
            C:\Windows\System32\lxss
            ```
            
    

    Step 3: Install WSL from the Microsoft Store

    1. Open the Microsoft Store.
    2. Search for Windows Subsystem for Linux or use this link.
    3. Install the WSL app.

    Step 4: Install a Linux Distribution

    1. Search for a Linux distribution in the Microsoft Store (e.g., Ubuntu).
    2. Install it.
    3. After installation, launch the distribution from the Start menu.

    Step 5: Verify WSL Installation

    Open PowerShell as Administrator and run:

    powershell
    Copy code
    wsl --list --verbose
    
    • You should see the installed distributions listed.

    Test launching the distribution:

       powershell
       Copy code
       wsl
    

    If it opens your Linux shell, you’re good to go!


    Key Learnings

    • The .msi error occurs because WSL was not fully registered or its files were missing from the lxss folder.
    • Manually copying the WSL kernel files resolves this issue and allows the kernel to be recognized.
    • This solution works on Windows Insider Builds like 24H2, where WSL behavior can sometimes break. How to Fix WSL Installation Errors (0x8007019e and .msi Issues) on Windows 11 Pro 24H2 Insider Build If you’ve been struggling to install or enable Windows Subsystem for Linux (WSL) and running into Error 0x8007019e, or the .msi installer for the WSL kernel gives you the dreaded "This update only applies to machines with the Windows Subsystem for Linux", you’re not alone. This issue can be particularly frustrating, and after scouring forums with no clear solution, I found a workaround that works! Here’s the step-by-step guide to fixing WSL when nothing else works. The Problem
      1. Running wsl commands always fails:
             plaintext
             Copy code
             PS C:\WINDOWS\system32> wsl --install
        

    The system cannot find the path specified. ```

    1. Attempting to enable WSL and related features using DISM may work, but the WSL kernel .msi installer gives this error:
           plaintext
           Copy code
           This update only applies to machines with the Windows Subsystem for Linux
      
    2. Even after enabling all necessary features and installing Ubuntu from the Microsoft Store, the system fails to recognize WSL as properly installed.

    This issue seems common on Windows Insider Preview Builds (24H2), but the solution might apply to other builds as well.

    The Solution

    Here’s the step-by-step process I used to fix WSL and get Ubuntu running successfully:

    Step 1: Fully Enable WSL Features

    1. Open PowerShell as Administrator and disable all WSL-related features to ensure a clean state:
           powershell
           Copy code
           dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
      

    dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart ```

    1. Restart your computer.
    2. Re-enable the required features:
           powershell
           Copy code
           dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
      

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ```

    1. Restart your computer again.

    Step 2: Manually Install the WSL Kernel

    If the .msi installer for the WSL kernel still fails, use this workaround:

    1. Download the .msi Kernel Update:
      • Go to WSL Kernel Update Package and download the .msi file.
    2. Extract the .msi:
      • Use a tool like 7-Zip to extract the .msi installer to a folder (e.g., C:\WSLKernel).
    3. Copy Kernel Files to the Correct Location:
      • Navigate to the extracted folder and locate the WSL kernel files.
      • Copy the kernel files to this directory:
                plaintext
                Copy code
                C:\Windows\System32\lxss
        

    Step 3: Install WSL from the Microsoft Store

    1. Open the Microsoft Store.
    2. Search for Windows Subsystem for Linux or use this link.
    3. Install the WSL app.

    Step 4: Install a Linux Distribution

    1. Search for a Linux distribution in the Microsoft Store (e.g., Ubuntu).
    2. Install it.
    3. After installation, launch the distribution from the Start menu.

    Step 5: Verify WSL Installation

    1. Open PowerShell as Administrator and run:
           powershell
           Copy code
           wsl --list --verbose
      
      • You should see the installed distributions listed.
    2. Test launching the distribution:
           powershell
           Copy code
           wsl
      
      If it opens your Linux shell, you’re good to go!

    Key Learnings

    • The .msi error occurs because WSL was not fully registered or its files were missing from the lxss folder.
    • Manually copying the WSL kernel files resolves this issue and allows the kernel to be recognized.
    • This solution works on Windows Insider Builds like 24H2, where WSL behavior can sometimes break.
    0 comments No comments

  4. Pragya Pandey 0 Reputation points
    2025-03-12T17:26:06.9933333+00:00

    To remove any corrupted older versions and install a new WSL, follow these steps:

    1. Download WSL.2.3.17.0.x64.
    2. Run the installer to automatically remove any previous corrupted versions and install the latest one.

    Hope this helps! 😊

    0 comments No comments

Your answer

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