Nehal Damania
Nehal Damania

Reputation: 9018

WSL2 stopped working with error The system cannot find the path specified

WSL2 stopped working suddenly. If I do a new installation of linux distros. Then it throws the following error, when I click launch button for the linux distro from play store:

Installing, this may take a few minutes... 
WslRegisterDistribution failed with error: 0x80070003
Error: 0x80070003 The system cannot find the path specified.

the wsl --help command works properly. All other wsl command hangs or throws error as shown below like wsl -l command throws this error The system cannot find the path specified.

Upvotes: 26

Views: 47650

Answers (9)

Bhavya Dhiman
Bhavya Dhiman

Reputation: 30

https://github.com/microsoft/WSL/releases

I just downloaded the latest version of WSL (.msi extension) from here directly and it just fixed my issue.

Upvotes: 0

user28350711
user28350711

Reputation: 1

Fixed the issue by enabling virtualization in the Bios settings of my CPU

Upvotes: 0

Burakhazır
Burakhazır

Reputation: 1

I've tried every command possible. I've executed all commands starting with "wsl." But the error persists. If neither 'wsl --install' nor 'wsl --update' is working and the error continues, there's only one solution: to format. The issue may be resolved by manually deleting files related to WSL among system 32 files, but you might accidentally delete system files in the process. Therefore, formatting is the most basic solution sorry...

Upvotes: -1

rtsan1
rtsan1

Reputation: 171

Here are the steps to fix this issue:

  1. Run with cmd administrator
  2. wsl --shutdown
  3. wslconfig /unregister Ubuntu
  4. wsl --install --distribution Ubuntu

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

Upvotes: 17

Subhojyoti Saha
Subhojyoti Saha

Reputation: 101

Was struggling with this issue for a long time and was able to fix it somehow. 2 Years too late but if anybody else has a similar issue now, then Try to recreate the following steps:

1)Search for Installed Apps

2)Search for Linux

3)Find Windows Subsystem for Linux and go to Advanced Options

Advanced Options WSL Screenshot

4)Click on Repair

Repair/Reset Screenshot

5)Check if WSL is working normally

6)If it doesn't work then Click on Reset

I had actually not seen the repair option and had clicked on Reset. Even though it said that it will delete data, my ubuntu data was preserved fine. Not sure how, so please proceed with caution for the final step. Hope this helps.

Upvotes: 10

Akhlesh Kumar
Akhlesh Kumar

Reputation: 15

"Enable" Virtualization from your bios settings. Settings may differ from bios to bios (search for your machine options)

Upvotes: -4

Breemer
Breemer

Reputation: 1

I know this is old but I had the same problem after deleting a driver associated with Hyper V and fixed it by uninstalling the virtual machine platform and Windows Hypervisor along with WSL, rebooted, reinstalled all 3 and then I could install Ubuntu again

Upvotes: 0

baltermia
baltermia

Reputation: 1353

I had the same thing happening to me after I moved the directory of my distro.

You have to unregister the distro from WSL;

wslconfig /u Ubuntu-20.04

and then just execute the installed exe and install the whole distro to WSL again.

Upvotes: 40

Nehal Damania
Nehal Damania

Reputation: 9018

I had to reinstall the windows to fix the issue. Something got corrupted in the OS. However, before reinstalling the OS as I had lot of work stored in the WSL2, I took the backup of the entire WSL2 image, the big .vhdx file. This file is the Virtual Hard Disk of WSL2 Linux. The files inside cannot be directly explored from Windows at the moment. If one has not moved the file anywhere else, it is stored here: %LOCALAPPDATA%\Packages\<PackageFamilyName>\LocalState\ext4.vhdx

Before reinstalling the OS, after taking the backup, I wanted to test if this backup runs fine on new install of WSL2. For that, I tested it on another machine, by installing the same Ubuntu WSL2 distro and replacing the .vhdx file created with the backup file. It ran fine. So, it felt safe to do entire OS reinstall and then reinstalling WSL2 Ubuntu and finally replacing the .vhdx file with the old backup .vhdx file. So, I did loose some time. But, my data and all the applications/programs on WSL2 were intact.

Upvotes: 4

Related Questions