-
Notifications
You must be signed in to change notification settings - Fork 849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wsl command outputs "The system cannot find the file specified." #5906
Comments
Look like the log is empty. could you please |
Here's the output:
|
Reinstalling the linux kernel and uninstalling other virtualization softwares(VirtualBox and VMware) solved it for me. |
Piggybacking on this as I'm seeing the same issue, however, spashii's success did not work for me. My WSL is dead. :( Logs: https://aka.ms/AA9p6ej
|
Honestly, it didn't work for me as well, now I'm not even working on WSL because of this issue. Why something great as WSL is full of bugs? 😑😣 |
From Logs https://aka.ms/AA9p6ej, the error is from HcnCreateNetwork. Likely it's Hyper-V issue |
Thanks, @licanhua . It looks like my Windows installation had an issue configuring network adapters, and that was one of the reasons that Hyper-V wouldn't uninstall so I could refresh it. Creating a new virtual switch in the Hyper-V Manager also failed miserably. Naturally, I went through the normal Windows steps of using sfc and dism to attempt to restore my system, but both found no issues. I attempted to uninstall all of my network adapters, but they would give me a code 56 every time they reappeared, even brand new ones.. Once I uninstalled the drivers for them, my HID devices also became unable to do class configuration, which left me without a keyboard. Feeling both desperate and stupid, I grabbed the release preview ISO of the 20H2 release of Windows 10 and did an in place upgrade with my working mouse, and shockingly, I'm now up and running again with working network adapters, Hyper-V, and WSL. ¯\(°_o)/¯ |
If your Windows is 19041.508(@nmelnick was hitting), I believe it's related to the known issue: kb4571756-breaks-hyper-v-synthetic-ethernet-port. |
I'm facing the same issue, and I'm thinking of resetting windows, but on wsl I have really important files, can I somehow export files or something else? |
Check if hyper-V is selected in Turn Windows features on or off |
I did fix my problem. I was not able to run wsl2 anymore, and not able to convert wsl 1 to 2.
wsl was not able to pick up the kernel from Nice improvement on wsl CLI @benhillis, @craigloewen-msft |
if you install linux wsl on another disk and the disk not connected.. error occured |
Still present. Using WSL preview.
Since there are possibilities that VM software is involved here, I do remember installing and uninstalling virtualbox between a working WSL and now a broken WSL. However, I cannot confirm that because I did not find a way to bring WSL back up and try to reproduce the problem yet. Edit: Edit: |
I installed Ubuntu for VSL, from the Store, on Windows 11 some time ago and was using it happily. However, I messed up a node and npm upgrade inside Ubuntu and decided to uninstall and reinstall from the store. Uninstall and reinstall went smoothly, but now I get "The system cannot find the file specified" when I try to run Ubuntu in Terminal, and I'm thrown back into PowerShell. I haven't touched or opened Hyper-V between the uninstall and the reinstall of Ubuntu. |
OK, after uninstalling again, I noticed that there was still a profile for Ubuntu in Windows Terminal. So I went into Terminal and removed that profile. Then I rebooted the Windows machine for good measure, reinstalled Ubuntu from the store, and now it runs fine in Terminal. So at least one issue seems to be that uninstalling a WSL doesn't remove the corresponding profile in Terminal, which it should do. |
I'm also having this issue. |
I'm having the same issue, but it seems to be only a windows terminal issue. If I run the exact same command configured in the windows terminal profile directly in powershell, it works. vs code also can still connect to the wsl instance without problem. I have no idea of the root cause because it just started happening today without having installed/uninstalled/reconfigured anything. Maybe something auto updated somewhere, who knows. Update: it's the "starting directory" in the windows terminal profile, which was set to ~ (which never worked anyway, the shell always launched into some windows directory). Apparently windows terminal tries to access it as a windows path and doesn't find it. |
Yep, I have the exact same error. I have had no recent updates installed, had Hyper-V installed for the longest time with a working WSL. Just went to update my distribution given the latest security updates for various distros, and got this error for Ubuntu. The default Starting directory is
HTH someone else out there. There's a bug for this in the Windows Terminal project here. |
for me doing this worked |
|
Yes, I unregistered #kali-linux in #wsl using wslconfig /u kali-linux and relaunched the Kali-Linux app. |
I have the same issue, but I do not want to unregister my ubuntu and re-installing it again. I'll try to investigate more |
defining %USERPROFILE% solved it for me on a Server 2022 Terminal Server - THANKS! |
For the time being from the file C:\Users<UserName>.wslconfig comment this value.
Source : https://docs.microsoft.com/en-us/windows/wsl/wsl-config |
You are a stud. This was my issue. |
When using |
i only solved with wsl --shutdown // shutdown wsl |
@BlixonX Thanks, this solved my issue! but I hope someone can really fix this bug. |
I think the main error is because the system has a distro selected that does not exist. Had the same error, now I can solve it with the following steps:
In NAME_DISTRO change with your distro. Delete each of the distros until you have none.
It will provide you with the following commands, execute them with the terminal in admin mode.
Install kernel if you have it already installed, you should not install it again.
Now if you can install the distro you want from the Microsoft Store. I hope it works for you! 🔥 |
My issue was quite different,
|
this worked for me |
Worked for me too |
I got this error when I manually disabled Hyper-V. I turned it back on and it worked |
Following steps worked for me: Uninstall Ubuntu for wsl. |
I was experiencing the same issue and this was the only thing that worked for me |
i run my ubuntu as run as administer |
Had this problem after having a bluescreen on startup caused by a driver's conflict after installing a PCIe device. #5906 (comment) solved the problem for me |
After upgrading the Docker Desktop, I encountered this problem. I restarted my laptop two times, and it worked. |
Note: To fixthe issue:
|
In my case the issue was that wsl.exe wants to start the windows service named WSLService and it couldn't find the executable. The solution was to open regedit and change this
to point to the correct location :
|
I tried all of this. Even reinstalling WSL completely doesn't work. I'm starting to think parts of WSL are in the Windows system image and if such parts are corrupt, you have to completely reinstall Windows. This is a super brittle system then, because reinstalling Windows completely removes applications and settings. If we now have to install multiple copies of Windows in different virtual machines in case of such corruption, then WSL is moot and we should just use VMs instead. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Environment
Steps to reproduce
I was working on my Ubuntu with wsl but somehow now it's not running and the output of my PowerShell is as follows:
WSL logs:
https://aka.ms/AA9maq4
Expected behavior
I was using Ubuntu distribution using WSL very often, but now it cannot even run.
Actual behavior
Somehow the distribution cannot run.
The text was updated successfully, but these errors were encountered: