0 ratings0% found this document useful (0 votes) 32 views7 pagesBash Linux On Windows
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
25r11/2020 How to Quickly Launch a Bash Shell From Windows 10's File Explorer
How-To Geek
How to Quickly Launch a Bash Shell From
Windows 10's File Explorer
CHRIS HOFFMAN @chrisbhoffman
UPDATED MARCH 15, 2018, 4:32PM EDT
©) Us Thee » Windows 1010) » Uses
Biter .
Bs cyete { sty
i detiop eae
2 Documents aS
4 Downs chee Date Customer
2) Mave te
E Picnees y
Bh veos Undo Rename cae
items Sse shared OpenaBashshe hee
Launch Bash on Windows 10 and it will automatically open to your
NIX nt's home folder. Rather than using the ed command to
change to another folder, you can launch Bash directly from a
folder in File Explorer.
You can do this without any registry hacks or changes. It's just
hidden. But if you're willing to dive into the registry, you can make it
alittle more convenient. Here are our two recommended methods.
Update: If you have multiple Linux environments installed, you can
use the wsleonfig command to choose the default Linux
environment that appears when you run the bash command.
The Easy Option: Use the Address Bar
RELATED: Everything You Can Do With Windows 10's New Bash
Shell
When you want to launch bash at a specific folder, just navigate
to that folder in File Explorer normally. Click the address bar while
hitps:twwn:[Link]/2708 1O/how4o-quiely-launch-a-bash-shel-from-windoWs-0s-fle-exolorarl#~text=The Easy Opon’%3A Use the A... 725r11/2020 How to Quickly Launch a Bash Shell From Windows 10's File Explorer
in that folder, type “bash”, and press Enter.
Drie Toois
Window 10)
SSyitent
[5 smoows-«
sind amen
eee [i Proga ies
crenriveemr A rogram Fes
1 Pettooe Programa
[Brogamric en
roam ties!” <
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 /nnt /c selected
ies
arage °
€ fs > ThsPC > Windows 10(6) a ach
The Right-Click Option: Add a Context
Menu Option by Edi
ig 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,
hitps:twn howlogeek com/27081OMhow to-quichy-launch-a-bash-shel-trom-windows-10s-Ale-oxolorerlt~toxt=The Easy Oplion"%3A Use the A... 2/725r11/2020 How to Quickly Launch a Bash Shell From Windows 10's File Explorer
we have a quick .reg file you can run below instead.
RELATED: Learning to Use the Registry Editor Like a Pro
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”.
one
test match
ge cont
Web
P regedit
regeait
Navigate to the following key:
HKEY_CLASSES_ROOT\Directory\Background\shell
Right-click the “shell” key and select New > Key.
htps:twn howlogeek com/2708 1 OMhow-to-quichy-launch-a-bash-shel-(rom-windows-10s-Alo-exploreri#t~text=The Easy Option"%3A Use the A.
a2511/2020 How to Quickly Launch a Bash Shell From Windows 10's File Explorer
file E6t Ven Favortes Help
Comguter MEY CLASSES ROOT Deen Afocgroundchal
2B orebcinen
Te Dae
Rec st (valent)
sting valve
Binary ae
DeoRD (2-i tue
‘WORD (Vue
at-Suing Value
Pesos.
Beer837) Copp Key pandabe sting ue
DikMeneg_ ont
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.
File Edt View Favortes Help
Comnpteh MEY CLASSES COT DectanABocgrounelhalseh
> = Bil naa re ry
: Oda Feast (alenotset
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”.
WE tesco a
Fle t_Viw Favoites Hp
Commuter MEY CLASSES ROOT\ Decor Afockgroundshalbsh
SB Obese] ene a =
* paar eau REG. lalue not s
[ll Bockground Bocoun =A i wt
ga
aes
3 Bh reweta ee
a (Detast)
i a
ee)
ae ao
> lj Deectshow |
orate + &
hitps:wwn:[Link]/2708 1 Ohow4o-quiely-launch-a-bash-shel-from-windows-0s-fle-exolorerl#~text=The Easy Option'%3A Use the A.
ar25r11/2020 How to Quickly Launch a Bash Shell From Windows 10's File Explorer
Next, right-click the "bash” key and select New > Key.
Name it “command”.
Uf Dreetory || mane wpe Date
[Background oot reas Oper 2 Bash shall hee
Sing Yate
: Renme WORD G2-be Yue
9 Discord ee ‘QWORD (6b Value
> adscorearn, OE NsSing Vale
DitManegem panda Suing Yue
> 51 DiskManoger, Copy KeyName
With the “command” key selected in the left pane, double-click
“(Default)” in the right pane and enter the following value:
C:\Windows\system32\[Link]
WE tesco a
Fle Edt View Favoites_Help
Comnpeh MEY CLASSES GOT Dectan/Bockgyounl halberd
I Drcctony A] name pe Dae
Rodan Feast (ake notset
Va aa
==
> discon s7zrzagusse619
Diskfaragemert. Comes w
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.
hitps:wwn:[Link]/2708 1 Ohow4o-quiely-launch-a-bash-shel-from-windows-0s-fle-exolorerl#~text=The Easy Option'%3A Use the A.
si25r11/2020
+ LD» There > Windows 19(0) > Uses
ative
B20 0bjecs
bets
2 Documents
How to Quickly Launch a Bash Shall From Windows 10's File Explorer
Search Ute e
vie
View
sonby
Group by
fran
Downs eee detoutuse® | OvRLraySenic
3 masic -;7
EiPictares Peat shorat
BE vies: Undo Renome cane
“= Wadewsi0(G) | OpeneBeshshelhae fy
Tieme Siete @Bstwe! | Grescceste i
Use Our One-Click Registry Hack
Rather than doing all the registry editing work above, you can
download our one-click .reg file. It does the exact same thing the
above registry hack does. If you decide you want to remove the
option, we've also included a one-click .reg file that will quickly
remove the option.
Download our one-click “Add Bash to the Context Menu” registry
hack and unzip the file. Double-click the “Add Bash to Your Context
[Link]' file and agree to add the information to your registry to
get the context menu option. Double-click the "Remove Bash From
Your Context Menu. reg’ file if you ever want to remove the option.
Hae- IREEENEE) Reicher cone a
PRET ere ote ee name °
ce
a sine bate
anes =o a
i desenp a
(Ay teatro con engin ni cng
Sepvoting crt Kyou erties cette eran
Elite onload tour Cote enh aed bah ou Contat
‘eyousure you wont to continue?
heme” Te selected 270 bytes
You should only add registry files from sources you trust. If you're
ever curious about what a .reg file does, you can right-click it in
hitps:wwn:[Link]/2708 1 Ohow4o-quiely-launch-a-bash-shel-from-windows-0s-fle-exolorerl#~text=The Easy Option'%3A Use the A.
or2ors2020 How to Quickly Launch a Bash Shall From Windows 10's Fle Explorer
Windows and select "Edit" to inspect the .reg file and see exactly
what information it will add or remove from your registry.
READ NEXT
> How to Disable “Get Even More Out of Windows” on Windows 10
> How to Stream the Macy's Thanksgiving Day Parade
> How to Kill Zombie Processes on Linux
> Why You Should Delay Your macOS Upgrades
» How to Turn on Dark Mode on Android
CHRIS HOFFMAN
Chris Hoffman is Editor in Chief of How-To Geek.
: He's written about technology for nearly a
decade and was a PCWorld columnist for two
years. Chris has written for The New York Times,
been interviewed as a technology expert on TV stations like
Miami's NBC 6, and had his work covered by news outlets like the
BBC. Since 2011, Chris has written over 2,000 articles that have
been read more than 500 million times—and that's just here at
How-To Geek. READ FULL BIO »
The above article may contain affiliate links, which help support How-To Geek,
How-To Geek is where you turn when you want experts to explain technology. Since we
launched in 2006, our articles have been read more than 1 billion times. Want to know more?
tps: [Link]/2708 1Ohow4o-quiely-launch-a-bash-shel-from-windoWs-10s-le-exolorarl#~taxt=The Easy Option’&3A Use the A... 7/7