Home / How To / How to Add Bash Shell to Folder right-click Context Menu in Windows 10

How to Add Bash Shell to Folder right-click Context Menu in Windows 10

Want to include the bash shell option in the folder (right-click) context menu so that you can access it quickly? It is possible, and here in this article, you will check the detailed guide on how to do that.

Windows 10 Anniversary update introduced lots of useful and new features to make the operating system more productive for normal users as well as developers. In this update, the company introduced the dark mode accompanied with Bash Shell, a Linux command line tool produced specifically by keeping developers in mind, and it is really a big deal.

By default, it is disabled, and users who want to use Ubuntu Bash on Windows 10 need to enable it manually. For more details, you can check out our detailed article How to Install and Use Linux Bash Shell on Windows 10.

Once Ubuntu Bash shell is enabled one can easily launch it right from the Start menu. In case, you’re a developer and use it frequently; then you will definitely love to have it in the folder right-click context menu so that you can quickly launch the Bash console in any folder with one click.

Here in this article, we will show all the steps that help in adding a new option in the right-click context menu to run the Bash on the desired folder using the Registry Editor.

So here is what you need to do:

Things to Keep in Mind:

Before following the steps in upcoming line make sure that the Bash Console is enabled and configured already. Bash Shell is only available in the Windows 10 Update 1607 and above build.

Once, you’re sure that bash is configured, then you apply the following registry tweak.

Add Bash to the Folder right-click Context Menu in Windows 10

1. Launch the Registry Editor.

registry-editor

For that, you need to type regedit in the Windows 10 Start menu search bar. Once regedit run command appears in the search results, click to run it.

Also, when UAC screen appears, click Yes to continue.

2. In the registry editor, you need to head over to the following key:

HKEY_CURRENT_USER\SOFTWARE\Classes\Directory

3. Here in this directory, you need to create a new subkey with name “shell”

new-subkey

To create a new subkey under Directory, you need to make a right click on the Directory -> New -> Key and name it “shell” in the space provided.

subkey-shell

Once, done it will look like shown in the above screenshot.

4. Under Shell, you need to create another subkey and name it something like “runbashshellhere“. Just like you created in above step under Directory key.

run-bash-shell-here

5. Now select the newly created subkey i.e. runbashshellhere and head over to the right pane. Here double click on the default value (unnamed) under runbashshellhere subkey and under Value Data, set its data to “Run Bash Shell Here.”

run-bash-shell-here

6. Under runbashshellhere subkey, you need to create new “Expandable String Value.”

expandable-string-value

And name it “Icon.”

expandable-string-value

7. Now double click on the icon (Expandable String Value) and Set its value data to following data:

%USERPROFILE%\AppData\Local\lxss\bash.ico

icon-value-data

8. Now under runbashshellhere key, you need to create a new key and name it “command.”

command-subkey

9. Here double click on the default value (unnamed) under command subkey and under Value Data, set its data to:

cmd.exe /c cd /d "%V" && bash.exe

It will look something like this:

command-subkey-value-data

That’s it! You have successfully added Ubuntu Bash Shell to folder (right-click context menu)

Image: windowscentral.com
Image: windowscentral.com

Alternate option to run Bash Shell 

In case, you’re not comfortable in editing the registry keys, then don’t worry. There is also an alternative method available to run the Bash Shell without touching a single registry quickly. Here is what you need to do:

1. Simply Launch the File Explorer and head over to the folder of your choice.

2. Type Bash in the Address bar of the File Explorer and hit Enter.

For example, if you are in C:\Windows, and use the address bar for the same, then bash shell will launch on /mnt/c/Windows.

open-bash-file-explorer

That’s it.

Why don’t you give a try to this amazing trick and let us know if you find it useful or not? If you have any query drop it in the comments. Hope you are now able to Add Bash Shell to Folder right-click Context Menu in Windows 10

About Viney Dhiman

Viney completed his Engineering in 2014 and has 2 years of experience in the field of Technology and Web development. He likes to write about latest updates in the Tech World in his free time. Email: vineyvande19@gmail.com

Check Also

Top 5 Best Hidden Features of Windows 10

Windows is the most popular computer operating system all around the world, having been installed …