Launch Bash on Windows 10 and it will automatically open to your UNIX account’s home folder. Rather than using the cd command to change to another folder, you can launch Bash directly from a folder in File Explorer.
The Easy Option: Use the Address Bar
When you want to launch bash at a specific folder, just navigate to that folder in File Explorer normally. Click the address bar while in that folder, type “bash”, and press Enter.
You’ll get a Bash prompt window focused in the folder you selected.
For example, if you type “bash” directly in the root of the C: drive, Bash will open with the directory
The Right-Click Option: Add a Context Menu Option by Editing the Registry
Perhaps you’d rather have a context menu option like the “Open command window here” option that appears when you hold Shift and right-click inside a folder in File Explorer.
To get this kind of Bash shortcut, you’ll need to edit the registry and add this feature yourself. If you’d rather not do this by hand, we have a quick .reg file you can run below instead.
Standard warning: The Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.
First, open the registry editor by pressing the Windows key, typing “regedit” into the Start menu, and pressing “Enter”.
Navigate to the following key:
Right-click the “shell” key and select New > Key.
Name the key “bash” or something similar. You can name it anything you want. This name doesn’t appear in Windows anywhere, and is just used to keep track of the entry in the registry.
Select “bash” (or whatever you named the key) in the left pane.
Double-click “(Default)” in the right pane and enter whatever name you want to appear in File Explorer’s context menu. For example, you could enter “Open a Bash shell here” or just “Bash”.
If you want the Bash entry to have an icon in File Explorer’s context menu, right-click the “bash” key and select New > String Value.
Name the value “Icon”, double-click it, and enter the following value:
Skip this step and don’t create an “Icon” value at all if you don’t want an icon in the menu.
Next, right-click the “bash” key and select New > Key.
Name it “command”.
With the “command” key selected in the left pane, double-click “(Default)” in the right pane and enter the following value:
You’re done. You can now right-click a folder in File Explorer and select “Open a Bash shell here” (or whatever you named the option) to quickly open a Bash shell to that specific folder. This option will appear immediately, so you don’t have to sign out or reboot first.
Latest posts by Unallocated Author (see all)
- Tips How To Recover Deleted Files on Windows PC Free and Easily - October 8, 2018
- iKeyMonitor Android Tracking App Review - September 4, 2018
- “Open Sesame” Vulnerability That Let Users Hack Windows 10 Was Demonstrated at Black Hat Conference - August 12, 2018