When you try to launch Bash.exe (Bash on Ubuntu on Windows) in Windows 10, the console window may open and close immediately. This happens if legacy mode is turned on for Command Prompt.
Also, if you open a Command Prompt window and type bash.exe, the following error would show up:
If you have an existing Command Prompt shortcut (cmd.exe), right-click on the shortcut and click Properties. In the Options tab, disable the checkbox for Use legacy console (requires relaunch)
If you don’t have an existing shortcut to Command Prompt, open a Command Prompt window (cmd.exe), right-click on the title bar, and click Properties. From the Options tab, you can disable legacy mode. It would be applied globally.
To apply the settings for multiple systems using a script or batch file, here is the command you need for disabling legacy mode.
REG.EXE ADD HKCU\Console /v ForceV2 /t REG_DWORD /d 1 /f
After doing so, Bash should now launch correctly.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
Just what feature is unsupported on the legacy console? bash itself?
@Mike: This may help → What’s New in the Windows Console in Windows Server 2016 | Microsoft Docs
After uncheck, when I open ubuntu bash it shows a black screen and nothing else. Please help.
Thanks this helped me install docker desktop. I had to disable legacy console in order to run it