Getting bash for Windows
Problem
You want to get bash for your Windows system, or you want to make sure you have the latest version.
Solution
Use Cygwin.
Download http://www.cygwin.com/setup.exe and run it. Follow the prompts and choose the packages to install, including bash, which is located in the shells category and is selected by default. As of early 2007, bash-3.1-6 and 3.2.9-11 are available.
Once Cygwin is installed, you will have to configure it. See the User Guide at http://cygwin.com/cygwin-ug-net.
Discussion
From the Cygwin site:
What Is Cygwin
Cygwin is a Linux-like environment for Windows. It consists of two parts:
A DLL (cygwin1.dll), which acts as a Linux API emulation layer providing substantial Linux API functionality.
A collection of tools, which provide Linux look and feel.
The Cygwin DLL works with all non-beta, non “release candidate,” x86 32-bit versions of Windows since Windows 95, with the exception of Windows CE.
What Isn’t Cygwin
Cygwin is not a way to run native Linux apps on Windows. You have to rebuild your application from source if you want to get it running on Windows.
Cygwin is not a way to magically make native Windows apps aware of Unix functionality (e.g., signals, ptys). Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.
Cygwin is a true Unix-like environment running on top of Windows. It is an excellent tool, but sometimes it might be overkill. For Windows native binaries of the GNU Text Utils (not including ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access