mskyaxl / wsl-terminal

Terminal emulator for Windows Subsystem for Linux (WSL)
MIT License
3.12k stars 160 forks source link

open-wsl.exe window closes immediately, mintty.exe Failed to run '/bin/bash': No such file or directory #160

Closed henkson closed 4 years ago

henkson commented 5 years ago

I have been using wsl-terminal 0.8.13 successfully, but it suddenly stopped working.

I have read issues #36 and #63, but I did not find a solution.

Using the wslbridge command did not really help:

C:\wsl-terminal\bin>wslbridge bash -c pwd

C:\wsl-terminal\bin>wslbridge echo abc & echo %errorlevel%
-2147483647

When running mintty.exe directly, a new window opens and gives this error:

/bin/bash: Exit 126.
Failed to run '/bin/bash': No such file or directory

However, when typing bash directly at the windows cmd prompt, it starts without problem:

C:\wsl-terminal\bin>bash
me@machine:/mnt/c/wsl-terminal/bin$

or

C:\wsl-terminal\bin> bash -c pwd
/mnt/c/wsl-terminal/bin
henkson commented 5 years ago

Apparently, I screwed up myself by changing the .bashrc and .profile files. Restoring them, fixed my problem.

henkson commented 5 years ago

Reopen: I don't know what temporarily fixed it, but it is broken again. I even re-installed my entire Ubuntu WSL, but I still get the error.

priyadarshan commented 4 years ago

I am having exact same issue.

ifeue commented 4 years ago

same issue.

itsjef commented 4 years ago

Same issue, refer: https://github.com/mintty/wsltty/issues/156