Bash Console Context Menu in Windows Explorer

The following instructions will give you a context menu that offers the option to open the WSL Bash in the current folder.

  1. Copy the Ubuntu Icon to C:\Windows\System32\.
  2. Create new file named BashConsoleHere.reg (or use the following instructions to edit your registry directly).
  3. Edit the file and paste the following instructions into it:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\BashConsoleHere]
    @="Bash Console Here"
    "Icon"="Ubuntu.ico"
    
    [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\Background\shell\BashConsoleHere\command]
    @="cmd /c cd \"%V\" && bash.exe"
    
    [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\BashConsoleHere]
    @="Bash Console Here"
    "Icon"="Ubuntu.ico"
    
    [HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\BashConsoleHere\command]
    @="cmd /c cd \"%1\" && bash.exe"
  4. Execute the BashConsoleHere.reg file and accept the warnings.
  5. Done.

Leave a Reply

Your email address will not be published.