
The easiest way to use Bash shell on Windows
I want to use the bash shell on windows in place of the command prompt. I’ve tried the Linux subsystem for Windows and it’s not what I’m looking for and Cygwin just doesn’t feel right. My search led me to the Git Bash shell bundled with Git for Windows.
This article is about how to install git bash and customize it.
To clarify, the bash shell included in Git for Windows is actually mingw64. Mingw64 has a windows installer here but I really like the “Git Bash Here” shell extension you get when you install Git for Windows.
How to Install Git Bash (Method 1 via choco
)
- Install Chocolatey
- Open a privileged Command Prompt window
- Install Git for Windows using choco
choco install git -y
or just Install Git for Windows (Method 2, traditional install)
- Navigate to gitforwindows.org
- Download and Run the Installer
- Make sure [*] Git Bash Here is checked
Launching Git Bash
From the Start Menu
From Windows Explorer
- Open Windows Explorer
- Navigate to your target folder
- Right-click on the folder and choose “Git Bash Here”
From an existing Command Prompt window
For this method to work you must add C:\Program Files\Git\usr\bin
to your PATH
From an command prompt just type bash
Customizing the bash prompt
The default prompt for Git Bash was a bit odd but you can change it just like on linux.
export PS1=”`pwd` #”