Cygwin - a Unix Environment and Shell on Windows

Cygwin logo

If your daily routine means that you spend much of your time behind a Windows system, yet you love the power and flexibility of a Unix-based environment, it might be frustrating not to have access to the tools and environment that you want.

Alternatively, you might want to compile some Linux/Unix software, so that it can run natively under Windows.

Cygwin is a Linux-style environment for Windows, that gives you a set of libraries, a full Linux-style command line and a package manager so you can install many of the Unix programs you might be familiar with.

I thought I would take a look at Cygwin's latest release and show you how to install it and get up and running.

First of all, head on over to the site and download setup.exe. This is the main installer/package manager for Cygwin and by default you use it to do an internet-based install, i.e. the setup program itself will download the packages.

Downloaded setup.exe file

Cygwin Installer

Once the installer is up and running, click Next to bypass the initial welcome screen. You will be given several options on how you want to obtain packages. In most cases, Install from Internet is fine here.

Next, choose the directory to install Cygwin to on your Windows machine. This directory will become your root (/) from within the Cygwin shell.

Choose Cygwin directory

On the next screen, choose the temporary folder where packages will be downloaded before they are installed into Cygwin. If you want, you can use a Windows temporary folder, but if you want to keep the source packages files around so you don't have to redownload later, make it somewhere permanent.

Again, click the old Next button and choose whether you need to use a proxy. In most home computer situations, leave the defaults intact and move on.

The Installer will at this point go off and retrieve a list of the different download sites, or mirrors, available to you. Choose one geographically close to you in preference, but any of them should be fine.

Cygwin Select Packages

Here, you need to choose the packages that you want to install. You can just leave this all as it is and move on, but if you want to install additional packages into Cygwin, follow these steps.

The categories can be either left at the Default setting, or you can choose to Install or Uninstall whole categories by clicking on the 'recycling' icon next to them (and the word 'Default').

For individual packages, expand a category and find the package you want. To install or uninstall it, add a check under the 'Binary' and/or 'Source' columns to grab what you want.

Once you're done choosing packages, click Next yet again to move on. You can always come back to this stage later by re-running the installer to add or remove packages.

Cygwin Download and Installation

Download and installation now takes place. Depending on the speed of your machine and how much you've asked to download, this could take a while.

Once the installation is finished, pick your Desktop and Start menu shortcut options and Finish.

Finally - that's the installation done! You can access Cygwin through the shortcuts you just made, or by browsing to the directory you installed it in and launching cygwin.bat.

You will be presented with a bash shell, just as on Linux, and all of the Cygwin packages you installed should now be available for use.

Cygwin shell

You can also access Windows programs and files through /cygdrive/[Windows drive letter].

And there you have it - a Linux compatible environment for your Windows machine. Cygwin isn't really for the faint hearted, or those without Linux/Unix CLI experience, but it is a very powerful platform to bringing many features of the Unix platform to a Windows machine in a native way.

You can even run X on it.

Avatar for peter Peter Upfold - http://peter.upfold.org.uk/

Peter Upfold is a technology enthusiast from the UK. Peter’s interest in Linux stems back to 2003, when curiosity got the better of him and he began using SUSE 9.0. Now he runs Linux Mint 9 on the desktop, runs a CentOS-based web server from home for his personal website and dabbles in all sorts of technology things across the Windows, Mac and open source worlds.

Home » Articles »

Discussion: Cygwin - a Unix Environment and Shell on Windows

  1. J.D. Freels (guest)

    # Posted on 17 July 2008 at 08:51 PM

    doesn't work with Windows-Vista



  2. Kevin (guest)

    # Posted on 20 July 2008 at 04:28 PM

    Cygwin has always worked fine on vista for me...

    Also, from Wikipedia(http://en.wikipedia.org/wiki/Cygwin): [..]Programs supported by Cygwin work well on Windows NT, Windows 2000, Windows XP, and Windows Vista,[..]

    Nice article :)



  3. raju (guest)

    # Posted on 02 November 2008 at 02:00 PM

    how do we install the software so that we perform unix commands and shell programs.



Home » Articles » Cygwin - a Unix Environment and Shell on Windows