How to launch Bash shell from right-click context menu on Windows 10

The Anniversary Update for Windows 10 brings a slew of new features and changes, which makes every user more productive, including developers. For example, in this new update, the operating system introduces a full-blown Bash shell, which is a Linux command-line tool designed specifically for developers -- and it's a big deal.

It's not a complicated task to install Bash on Ubuntu on Windows 10, and it can be easily launched from the Start menu. However, many times, developers will find themselves working inside File Explorer where they wish they could simply use the right-click menu to open Bash from the working directory. Just like it's possible when you press and hold the Shift key to open Command Prompt.

In this Windows 10 guide, we'll walk you through the process to include a new option in the right-click context menu to open Bash on a particular working directory using the Registry.

How to add an open Bash shell option on the right-click context menu

Important: Before proceeding with this guide, you should know that modifying the registry is risky, and it can cause irreversible damage to your installation if you don't do it correctly. It's recommended to make a full backup of your computer before proceeding.

  1. Use the Windows key + R keyboard shortcut to open the Run command, type regedit, and click OK to open the registry.
  2. Browse the following path:HKEY_CLASSES_ROOT\Directory\Background\shell
  3. Right-click the Shell (folder) key.
  4. Select New and click on Key.

  1. Name the key bash and press Enter.
  2. Select the bash key, and on the right side, double-click the (Default) string and enter the text you want to appear in the option for the context menu. For example, "Open Bash on this location," "Open Linux Bash," or anything you want.
  3. Click OK to continue.

  1. Right-click the bash (folder) key.
  2. Select New and click on Key.
  3. Name the key command and press Enter.
  4. Select the command key, and on the right side, double-click the (Default) string and enter the path to open Bash:C:\Windows\System32\bash.exe
  5. Click OK to complete the task.

Once you've completed the instructions, you can open any folder, right-click on an empty space, and you'll find the new option to launch Bash.

Additionally, you can add an icon that will help your eyes to spot the option even quicker, and to do that, you can use these steps:

  1. While in the Registry, right-click the bash (folder) key.
  2. Select New and click on String Value.

  1. Name the key Icon and press Enter.
  2. Double-click the string and enter the path for the Bash shell tool:%USERPROFILE%\AppData\Local\lxss\bash.ico
  3. Click OK to complete the task.

Alternative option

The above instructions are aimed for tech-savvy users, but if you're not comfortable tweaking the Registry, just as in school you were taught the long process and then the short version, there is an alternative way to open Bash without touching the Registry.

The alternative process involves to open File Explorer on the folder you want, and then type bash on the address bar and press Enter. For example, if you're on C:\Windows, and use bash on the address bar, bash will open on /mnt/c/Windows.

More Windows 10 resources

For more help articles, coverage, and answers on Windows 10, you can visit the following resources:

Mauro Huculak

Mauro Huculak has been a Windows How-To Expert contributor for WindowsCentral.com for nearly a decade and has over 15 years of experience writing comprehensive guides. He also has an IT background and has achieved different professional certifications from Microsoft, Cisco, VMware, and CompTIA. He has been recognized as a Microsoft MVP for many years.