I am trying to open Bash in Windows 11. However, I can't get it to open. The best that happens is it opens and then immediately closes (in a fraction of a second).
I understand there is already a question posted regarding opening bash in Win 10 Anniversary. I tried those fixes, but they were not effective. Since Windows 11 has significant changes (especially compared to Win 10 feature updates), I argue that it deserves its own post.
The steps that I have taken:
- Turn on developer mode (significantly different in Win 11. I followed this guide on How to Enable Developer Mode in Windows 11.
- Turn on WSL (following this guide to Enable Bash on Windows 10) and start Bash.
I have gone through these steps several times, but had no success. In addition to following the instructions set out about, I have:
- Restarted my computer many, many, times.
- Uninstalled/reinstalled WSL from 'Turn Windows features on and off' several times.
- Tried the solution set out in the parent question (opening in Win 10) and tried enabling legacy console. I have tried with legacy on and off, without success.
- Tried typing the command (in CMD prompt), "bash". Another post about Bash opening and closing mentioned (first answer by '-Mr Happy') about typing "Bash" into CMD prompt. I tried that and CMD responded with "Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore". This took me to the Windows Store to install a program to "Run Linux on Windows". As such...
- I installed the Ubuntu app. I had no idea what this would accomplish, but I was happy to try anything at this stage. When opening the Ubuntu app, it just opens a shell window (not sure about terminology) which says "Press any key to continue..." (closes the window immediately). I don't know what this was supposed to do, but I basically uninstalled/reinstalled WSL just to check.
- Additional to -Mr Happy-'s advice above, he suggested to check the contents of the folder: C:\Users%USERNAME%\AppData\Local\lxss. At no point was the folder 'lxss' created. I imagine this is why bash.exe never worked. Nothing that I did caused the folder to be created.
All of this is to install zsy on my computer. I appreciate any advice on the matter.