Thank you @skrebbel that is a very helpful command, here is are .reg file codes to add a Bash Console Here right-click context menu if you have Windows Subsystem for Linux
AddContext.reg:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\BashConsoleHere] @="Bash Console Here" "Icon"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,00,41,\ 00,54,00,41,00,25,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,00,\ 68,00,2e,00,69,00,63,00,6f,00,00,00 [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\BashConsoleHere\command] @="bash -c 'exec bash --init-file <(echo \". \"$HOME/.bashrc\"\")'" [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\BashConsoleHere] @="Bash Console Here" "Icon"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,00,41,\ 00,54,00,41,00,25,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,00,\ 68,00,2e,00,69,00,63,00,6f,00,00,00 [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\BashConsoleHere\command] @="bash -c 'exec bash --init-file <(echo \". \"$HOME/.bashrc\"\")'" [HKEY_CLASSES_ROOT\Drive\shell\BashConsoleHere] @="Bash Console Here" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOT\Drive\shell\BashConsoleHere\command] @="bash -c 'exec bash --init-file <(echo \". \"$HOME/.bashrc\"\")'"
Undo.reg:
Windows Registry Editor Version 5.00 [-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\BashConsoleHere] @="Bash Console Here" "Icon"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,00,41,\ 00,54,00,41,00,25,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,00,\ 68,00,2e,00,69,00,63,00,6f,00,00,00 [-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\BashConsoleHere\command] @="nircmd elevate cmd /c cd \"%V\" && bash.exe" [-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\BashConsoleHere] @="Bash Console Here" "Icon"=hex(2):25,00,4c,00,4f,00,43,00,41,00,4c,00,41,00,50,00,50,00,44,00,41,\ 00,54,00,41,00,25,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,00,\ 68,00,2e,00,69,00,63,00,6f,00,00,00 [-HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\BashConsoleHere\command] @="nircmd elevate cmd /c cd \"%1\" && bash.exe" [-HKEY_CLASSES_ROOT\Drive\shell\BashConsoleHere] @="Bash Console Here" "Extended"="" "NoWorkingDirectory"="" [-HKEY_CLASSES_ROOT\Drive\shell\BashConsoleHere\command] @="nircmd elevate cmd /c cd \"%1\" && bash.exe"
konsolehas--noclosebash, and not forgnome-terminal. Should I delete this question?