WSL: Can't open Windows app from WSL 2 anymore
-
Your Windows build number: [Version 10.0.18990.1]
-
What you’re doing and what’s happening: Not sure when but I think after I moved WSL 2 to another drive using LxRunOffline, I couldn’t open any Windows app from WSL bash anymore. This error would appears everytime I tried to open .exe app:
explorer.exe .
command not found: explorer.exe
/mnt/c/Windows/explorer.exe .
run-detectors: unable to find an interpreter for /mnt/c/Windows/explorer.exe
- What’s wrong / what should be happening instead: EXE apps should runs flawlessly.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 31 (4 by maintainers)
I also ran into this problem (e.g. error message “run-detectors: unable to find an interpreter for /mnt/c/Windows/explorer.exe”).
It turned out that my problem was that I installed nuget package manager in the wsl2-container, and nuget required mono-runtime, which registered another entry (named cli) with /proc/sys/fs/binfmt_misc .
I was able to confirm this by disabling the cli interpreter using the command:
sudo update-binfmts --disable cliAfter that nuget did not work from within the wsl2 container, but I was able to start explorer.exe
I encountered this error previously, although I didn’t move my WSL2 to another drive.
Have you tried runing
wsl --shutdownon powershell then starting WSL2 again? This was the workaround when I had the issue about a month ago.This worked for me!!
After doing “wsl --shutdown” and starting WSL again - it started working.
It should be caused by the conflict with systemd.
Please check the file
/etc/wsl.confand see if thesystemd = trueflag was added under[boot]settings as shown below. If so, please switch it to false.For more info, please refer to https://learn.microsoft.com/en-us/windows/wsl/wsl-config#per-distribution-configuration-options-with-wslconf
Hello!
I had a similar issue. After a bit of searching I checked
/etc/wsl.confand noticed that it only contained the following:Setting it to true and then forcing a restart of wsl (
wsl --shutdown) fixed it for me.I can’t figure what changed this though.
Yes, without any lucks 😦