WSL: Running ubuntu1804.exe outputs error: "Cannot find the specified path"
Please fill out the below information:
- Your Windows build number: (Type
verat a Windows Command Prompt)
Microsoft Windows [Version 10.0.17763.379] 2019 Server
- What you’re doing and what’s happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
PS C:\Users\Administrator\Ubuntu> .\ubuntu1804.exe
The system cannot find the path specified.
PS C:\Users\Administrator\Ubuntu> bash
The system cannot find the path specified.
- What’s wrong / what should be happening instead:
I would’ve expected to be in a bash prompt to run Linux commands
- Other information
My directory:
PS C:\Users\Administrator\Ubuntu> ls
Directory: C:\Users\Administrator\Ubuntu
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 4/14/2019 11:03 AM AppxMetadata
d----- 4/14/2019 11:03 AM Assets
------ 8/17/2018 3:15 AM 212438 AppxBlockMap.xml
------ 8/17/2018 3:15 AM 3835 AppxManifest.xml
------ 8/17/2018 3:17 AM 11112 AppxSignature.p7x
------ 8/17/2018 3:15 AM 223983209 install.tar.gz
------ 8/17/2018 3:15 AM 5400 resources.pri
------ 8/17/2018 3:15 AM 211968 ubuntu1804.exe
------ 8/17/2018 3:15 AM 744 [Content_Types].xml
I’ve added the dir C:\Users\Administrator\Ubuntu to my PATH
PS C:\Users\Administrator\Ubuntu> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Path :
Online : True
RestartNeeded : False
I followed this guide: https://docs.microsoft.com/en-us/windows/wsl/install-on-server
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 20 (1 by maintainers)
If you want, you should be able to uninstall via
wslconfig /unregister Ubuntu-18.04and then reinstall.Windows Update applied KB4534132 to my Windows 10 (1903) laptop this morning and then prompted me to reboot. After rebooting, my Ubuntu 18.04 distro is no longer available under WSL. (Ubuntu 18.04 does still show up under Add/Remove programs but there are no files available under C:\Users<user>\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs or C:\Users\0017919\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState.)
Launching WSL gave me the following error:
Running “wsl /?” displayed the following error:
I went ahead and uninstalled Ubuntu 18.04 and WSL rebooted and reinstalled both. Now when I try to execute wsl or bash, I get the following error:
When I execute wslconfig /l, it shows the following:
Unfortunately, I’ve run out of ideas on how to fix this. This is extremely disappointing as I had everything set up to do development within WSL but Windows Update wiped everything out and seems to have made it impossible to get it working again. This is completely unacceptable and my only option is to switch back to Linux.
I gave Microsoft a chance and they blew it. Microsoft says that they love Linux and that they love developers but they prove otherwise with very poorly designed systems like WSL. Why should developers trust Microsoft when their development tools are so brittle and broken?
This worked for me on a Server 2019 which was throwing the same error “The system cannot find the path specified”. Unregistered the Ubuntu from wslconfig command
PS C:\Distros\Ubuntu1804> wslconfig /unregister Ubuntu-18.04Unregistering...The system cannot find the path specified.PS C:\Distros\Ubuntu1804> wslconfig /lWindows Subsystem for Linux has no installed distributions.Distributions can be installed by visiting the Microsoft Store:https://aka.ms/wslstoreAnd then from File explorer double clicked the ubuntu1804.exe file
Installing, this may take a few minutes...Please create a default UNIX user account. The username does not need to match your Windowsusername.For more information visit: https://aka.ms/wslusersEnter new UNIX username: ***********Enter new UNIX password:Retype new UNIX password:passwd: password updated successfullyInstallation successful!To run a command as administrator (user "root"), use "sudo <command>".See "man sudo_root" for details.user@server:~$After all the work to configure it??? Come on
@crramirez has a good workaround until the solution is available: make sure your distros install on the system drive to ensure that they are not encrypted. Closing this issue and marking as workaround-available and fixinbound. Duplicate of #4272
This is a repeating issue: Please, check issues to find many like this. The problem is that some distros, even paid, from Microsoft store don’t put the rootfs virtual disk image, vhdx file, to the correct place during installation. The CentOS8 was my case. Obviously, you can’t correct it if you don’t know where is it. I think that it is up to the WSL team to provide instructions and script which help to recover from such a situation and put the distro vhdx to the Default/Desired place, for example to my huge and ultra-fast secondary ssd disk.
@Suhail can you run
wslconfig /lin powershell and show the output here?