4.3. Windows: Cygwin

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

Over time the Wireshark development toolchain has been migrating away from Cygwin toward native tools and we hope to eliminate it as a requirement someday.

Although Cygwin consists of several separate packages, the installation and update is done through a single utility, setup-x86.exe or setup-x86_64.exe, which acts similarly to other web based installers. You can install Cygwin and its packages using Chocolatey, but this is not recommended due to Chocolatey’s default installation location, described in the previous section.

4.3.1. Installing Cygwin using the Cygwin installer

You will find setup-x86.exe, for 32-bit systems, and setup-x86_64.exe, for 64-bit systems, at http://www.cygwin.com/install.html. Click on the link for the appropriate setup utility to download it. After the download completes, run it.

All tools will be installed into one base folder. The default is C:\cygwin for the 32-bit installer and C:\cygwin64 for the 64-bit installer.

The setup utility will ask you for some settings. The defaults should usually work well, at least initially.

If, at the "Choose A Download Source" page, you use the default "Install from Internet" setting, you will need to choose a download site at the "Choose A Download Site" page. See the list of mirror sites at http://cygwin.com/mirrors.html to choose a download site appropriate to your location.

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 StartProgramsCygwinCygwin Bash Shell you should now be able to start a new Cygwin bash shell, which is similar to the standard Windows Command Prompt (cmd.exe) but much more powerful.

4.3.2. Add/Update/Remove Cygwin Packages

If you want to add, update, or remove packages later you can do so by running the setup utility 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.

4.3.3. Installing Cygwin using Chocolatey

Chocolatey supports Cygwin as an external package source. To install Cygwin itself run

PS$>choco install cygwin
# You might also need to install cyg-get:
PS$>choco install cyg-get

Chocolatey installs Cygwin in C:\ProgramData\chocolatey\lib\Cygwin\tools\cygwin by default.

One or more Cygwin packages can be installed using cyg-get:

PS$>cyg-get sed asciidoc