4.2. Win32: Cygwin

Cygwin provides a lot of UNIX based tools on the Win32 platform. It uses a UNIX emulation layer which might be a bit slower compared to the native Win32 tools, but at an acceptable level. The installation and update is pretty easy and done through a single utility, setup.exe.

The native Windows tools will typically be a bit faster but more complicated to install, as you would have to download the tools from different web sites and install and configure them them individually.

[Note]You must have Cygwin installed

As there’s no Win32 native bash version available, at least a basic installation of Cygwin is required in any case. This may change in the future as packaging systems such as NuGet and Chocolatey mature.

Although Cygwin consists of several separate packages, the installation and update is done through a single utility, setup.exe, which acts similar to other web based installers. All tools will be installed into one base folder. The default is C:\cygwin.

You will find setup.exe at http://www.cygwin.com/. Click on one of the "Install Cygwin now" links to download setup.exe. After the download completes, run it.

Setup.exe will ask you for some settings. The defaults should usually work well, at least initially. At the "Select Packages" page, you’ll need to select some additional packages, which are not installed by default. Navigate to the required Category/Package row and click on the "Skip" item in the "New" column so it shows a version number for the required package

After clicking the Next button several times the setup will then download and install the selected packages (this may take a while, depending on the package size).

Under: Start→Programs→Cygwin→Cygwin Bash Shell you should now be able to start a new Cygwin bash shell, which is similar to the standard Windows command line interpreters (command.com / cmd.exe) but much more powerful.

4.2.1. Add/Update/Remove Cygwin Packages

If you want to add, update, or remove packages later you can do so by running setup.exe again. At the "Select Packages" page, the entry in the "New" column will control what is done (or not) with the package. If a new version of a package is available, the new version number will be displayed, so it will be automatically updated. You can change the current setting by simply clicking at it, it will change between:

  • A specific version number. This specific package version will be installed.
  • Skip. Not installed, no changes.
  • Keep. Already installed, no changes.
  • Uninstall. Uninstall this package.
  • Reinstall. Reinstall this package.