Bash on Windows

Learn what you need to do to use Bash on Windows.

Software options

If you’re using Windows as your OS, you need both a Bash interpreter and a POSIX-compatible environment. Bash needs this environment to work correctly.

There are two ways to install it.

You can meet the “Unix environment” and “Linux environment” terms. They both mean a software environment that is compatible with POSIX standards.

The first option is to install the MinGW toolkit. It contains the GNU compiler collection in addition to Bash. If you do not need all MinGW features, you can install Minimal SYStem (MSYS) instead. MSYS is the MinGW component that includes Bash, a terminal emulator, and GNU utilities.

Clarifying the bitness of Windows

It is always good to clarify the bitness of your Windows before installing any software. Here are steps to read it:

  1. If you have a “Computer” icon on your desktop, right-click on it and select the “Properties” item.
  2. If there is no “Computer” icon on your desktop, click the “Start” button. Find the “Computer” item in the menu. Right-click on it and select “Properties”.
  3. You have opened the “System” window. Locate the “System Type” item there as the figure below demonstrates. This item shows you the bitness of Windows.

Get hands-on with 1200+ tech skills courses.