# Installing Bash on Microsoft Windows

This page provides instructions for installing a Bash shell on Microsoft Windows, required for running the [Caplin Deployment Framework](index.md) on Windows.

The Caplin [Deployment Framework](index.md) is compatible with the Bash shells Cygwin and Git Bash.

**📌 NOTE**\
Microsoft Windows is not a supported operating system for production deployments of Caplin Platform components.

## Installing Cygwin

To install [Cygwin](https://www.cygwin.com/), follow the steps below:

1. Download the Cygwin installer from the [Cygwin](https://www.cygwin.com/) website.
2. Run the Cygwin installer and follow the [installation instructions](https://cygwin.com/install.html) on the Cygwin website.

   When prompted by the installer, select the following additional packages: **zip**, **unzip**, **vim**, **vim-common**, **dos2unix**, **wget**, and **curl**.
3. After installation, open a Cygwin terminal and run the command below to configure Cygwin to implement Bash symbolic links as Windows file shortcuts:

   ```bash
   echo 'export CYGWIN=winsymlinks:lnk' >> ~/.bashrc
   ```

   <dl><dt><strong>💡 TIP</strong></dt><dd>

   Alternatively, if you don’t want to set `CYGWIN=winsymlinks:lnk` in `~/.bashrc`, then you can set it temporarily when unzipping the Deployment Framework:

   ```console
   $ CYGWIN=winsymlinks:lnk unzip -qoa DeploymentFramework-<version>.zip
   ```

   See [Installing the Deployment Framework](cdf-installing-the-deployment-framework.md)
   </dd></dl>
4. Close the Cygwin terminal

For background information on how Cygwin implements Bash symbolic links on Windows, see [Symbolic links](https://cygwin.com/cygwin-ug-net/using.html#pathnames-symlinks) in the Cygwin manual.

## Installing Git Bash

Git Bash is included with [Git for Windows](https://git-scm.com/downloads). If you already have Git for Windows installed, skip to step 3 in the installation instructions below.

The Git for Windows installer requires you to have a knowledge of common Git configuration options. In case you are not familiar with Git, the instructions below include a list of Git options commonly used by Windows developers in mixed-OS environments. If you have already installed Git for Windows, you do not need to adjust your Git configuration to suit the example options below.

To install Git for Windows, follow the steps below:

1. Install [Notepad{plus}{plus}](https://notepad-plus-plus.org).

   Git requires a default editor, and Notepad{plus}{plus} is a better option on Windows than the traditional Git default of Vim if you need to integrate Git with other Windows programs. See the _Choosing the default editor used by Git_ option below.
2. Run the [Git for Windows](https://git-scm.com/downloads) installer, and select the following Git configuration options when prompted:
   * **Choosing the default editor used by Git**: Use Notepad++

     **💡 TIP**\
     Notepad++ is a better choice than Vim if you need to integrate Git with other Windows programs.
   * **Adjusting your PATH environment**: 'Use Git from the Windows Command Prompt'
   * **Choosing the SSH executable**: 'Use OpenSSH'
   * **Choosing HTTPS transport backend**: 'Use the OpenSSL library'
   * **Configuring the line ending conventions**: 'Checkout as-is, commit Unix-style line endings'
   * **Configuring the terminal emulator**: 'Use MinTTY'
   * **Configuring extra options**: 'Enable file system caching' and 'Enable Git Credential Manager'

     **📌 NOTE**\
     The extra option 'Enable symbolic links' is not required by the Caplin Platform on Windows. This option configures the `git` command on Windows to implement Bash symbolic links as [NTFS native symbolic links](https://en.wikipedia.org/wiki/NTFS_symbolic_link). This option requires Windows 10, local Administrator privileges, and a new group policy entry (`SeCreateSymbolicLinkPrivilege`).
3. After installation, open a Git Bash terminal and run the command below to configure Git Bash to implement Bash symbolic links as Windows file shortcuts:

   ```bash
   echo 'export MSYS=winsymlinks:lnk' >> ~/.bashrc
   ```

   The next time you open a Git Bash terminal, Git Bash will warn you that it has automatically created a Bash `~/bash_profile` file. You can safely ignore this warning.

   <dl><dt><strong>💡 TIP</strong></dt><dd>

   If you don’t want to set `MSYS=winsymlinks:lnk` in `~/.bashrc` (for example, if you’ve set `MSYS=winsymlinks:nativestrict` for working with Git), then you can set `MSYS=winksymlinks:lnk` temporarily when unzipping the Deployment Framework:

   ```console
   $ MSYS=winsymlinks:lnk unzip -qoa DeploymentFramework-<version>.zip
   ```

   See [Installing the Deployment Framework](cdf-installing-the-deployment-framework.md)
   </dd></dl>
4. Close the Git Bash terminal
