Cygwin

 
 
Cygwin is a Linux-like environment for Windows. It consists of two parts:
  • A DLL (cygwin1.dll) which acts as a Linux emulation layer providing substantial Linux API functionality.
  • A collection of the popular GNU development tools.
Cygwin runs on all modern 32 bit versions of Windows, except Windows CE. This includes Windows 95/98/ME/NT/2000/XP/Vista. Cygwin is distributed at no charge for commercial or non-commercial use. For more information read the Cygwin licensing terms.

More information about Cygwin can be found at:
http://www.cygwin.com

The latest Cygwin version can be downloaded from:
hhttp://www.cygwin.com

Online documentation about Cygwin can be found at: http://cygwin.com/docs.html

Documentation for the individual GNU tools can be found at: http://www.fsf.org/manual/







Installing Cygwin using setup v2.819.



Information
none

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Procedure
  1. Goto http://www.cygwin.com/ and click on "Install Cygwin".

  2. Download the GUI installer called setup-x86.exe.

  3. Save this file in directory: C:\tools\cygwin.

  4. Execute setup-x86.exe.

  5. Press Next button.

    Cygwin Setup

  6. Select "Install from Internet" and press Next button.

    Cygwin Setup Installation Type

  7. Specify root install directory.
    For example: c:\cygwin

    Press Next button.

    Cygwin root install directory

  8. Specify the directory where to store the downloaded files.
    For example: c:\tools\cygwin

    Press Next button.

    Cygwin Setup Local Package Directory

  9. Select a connection type.
    Choose "Direct Connection" and press Next button.

    Cygwin Setup Connection Type

  10. Select a download site near your location and press Next button.

    Cygwin Setup Download Site

  11. The chooser window is now displayed.

    Packages are grouped into categories and one package may belong to multiple categories. Each package can be found under any of those categories in the heirarchial chooser view.

    By default setup.exe will install only the packages in the Base category and their dependencies, resulting in a minimal Cygwin installation.

    Setup.exe automatically selects dependencies. Be careful not to unselect any required packages. In particular, everything in the Base category is required.

    Cygwin chooser window

    A toggle Cygwin toggle is displayed next to the category (= Toggle category) and package (= Toggle package).

    If you click on the Toggle category you will have the following options:

    Toggle category optionsDescription
    Default Only install the packages in the Base category and their dependencies, resulting in a minimal Cygwin installation.
    Install Install all packages assigned to this category.

    If a package was already installed,
    Toggle package = "Keep".

    If a package was not installed,
    Toggle package = "version number".
    Reinstall Reinstall all packages assigned to this category.

    If a package was already installed,
    Toggle package = "Reinstall".

    If a package was not installed,
    Toggle package = "Skip".
    Uninstall Uninstall all packages assigned to this category.

    If a package was installed,
    Toggle package = "Uninstall".

    If a package was not installed,
    Toggle package = "Skip".

    If you click on the Toggle package you will have the following options:

    Toggle category optionsDescription
    Keep The package was already installed. Do nothing.
    Reinstall Reinstall the package.
    Uninstall Uninstall the package.
    Skip The package is not installed. Do nothing.
    version number Install the package with this version number.

    By clicking on the View button you can determine which view style to display.
    • Category - The default
    • Full - Show all packages.
    • Pending - Show only packages to be upgraded.
    • Up to Date - Show packages which are up to date.
    • Not installed - Show all packages which are not installed.

  12. Select the packages to be downloaded and press Next button.

    Cygwin Setup Select Packages to Download

    Note:
    If you want to use Cygwin for C or C++ programming make sure to select "gcc", "g++", "gdb", and "make" packages under the "Devel" (Development) category. These packages are not part of the default installation.

    Cygwin C and C++ Packages

  13. All packages are downloaded separately to the local package directory: c:\tools\cygwin

    Cygwin Setup Download Progress



  14. Press Finish button.

    Cygwin Finish

  15. To check the Cygwin version, double click the Cygwin icon on your desktop.
    A Cygwin terminal window opens.
    Type: cygcheck -V

    You should see:
    cygcheck (cygwin) 1.7.24
    System Checker for Cygwin
    Copyright (C) 1998 - 2013 Red Hat, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


  16. In the Cygwin terminal window you can enter UNIX commands.
    Type: ls -al

    You should see:

    Cygwin Terminal Window

  17. Mapping between Unix paths and Windows paths

    Unix path Windows path
    / c:\cygwin
    /bin c:\cygwin\bin
    /dev c:\cygwin\dev
    /etc c:\cygwin\etc
    /home c:\cygwin\home
    /lib c:\cygwin\lib
    /proc c:\cygwin\proc
    /etc c:\cygwin\etc
    /tmp c:\cygwin\tmp
    /usr c:\cygwin\usr
    /var c:\cygwin\var
    /cygdrive/c c:/
    /cygdrive/d d:/
    /cygdrive/c/Downloads c:\Downloads
    /cygdrive/c/Windows c:\Windows
    /cygdrive/c/Users c:\Users

  18. To make Unix commands (for example: ls, grep, find, make, etc) available in a dos window and other applications (such as Eclipse CDT "C/C++ Development Tooling") add the Cygwin bin directory to your path.
    e.g.: PATH=%PATH%;C:\cygwin\bin

  19. Open a dos window and goto C:\cygwin
    Type: ls -al

    You should see:

    total 297
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:44 .
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:44 ..
    -rw-r--r--   1 Robert root   53342 Aug 27 19:44 Cygwin-Terminal.ico
    -rwxr-xr-x   1 Robert root      57 Aug 27 19:44 Cygwin.bat
    -rw-r--r--   1 Robert root  157097 Aug 27 19:44 Cygwin.ico
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:40 bin
    dr-xr-xr-x   1 Robert None       0 Sep 14 10:36 cygdrive
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:40 dev
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:40 etc
    drwxrwxrwt+  1 Robert None       0 Aug 27 19:47 home
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:40 lib
    dr-xr-xr-x   7 Robert None       0 Sep 14 10:36 proc
    drwxrwxrwt+  1 Robert None       0 Aug 27 23:21 tmp
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:39 usr
    drwxr-xr-x+  1 Robert None       0 Aug 27 19:39 var


  20. To install, remove or update packages:
    • Goto directory: C:\tools\cygwin
    • Execute setup-x86.exe
    • Follow the same steps as mentioned above.