Installing Cygwin

  1. Run the DOS shell: Select Start->Run.
    {short description of image}
    Type cmd and click Ok.
    {short description of image}

    NOTE: If you run Windows 95/98/ME, you need to type command instead.

    You will see a DOS shell window.
    {short description of image}
    Never seen one of these before? Congratulations—you have just reached Level 2.
  2. Type
    mkdir c:\temp
    and hit the ENTER key. If you get an error message that the directory already exists, then that's ok.
  3. Start your browser and go to www.cygwin.com . Click on the link that looks like this:
    {short description of image}
  4. Depending on your browser, you may or may not get a dialog that asks you whether you want to run or save the file. Of course, Run is a reckless option that you should never select. Select Save.

  5. You will get a “Save As” dialog such as this one.
    {short description of image}
    Change the file name to c:\temp\setup.exe and click on Save.
  6. Depending on your browser, you may get a dialog box telling you that the download is complete. Close the dialog.

  7. When your browser is done downloading the file, switch to the shell window that you opened in step 1. (Reopen it if you closed it.) Then type
    c:
    cd \temp
    setup
    Remember to hit ENTER after every line of input in the shell window—I won't mention that again. The Cygwin setup program starts:

    Click Next. Then select “Install from Internet”.
    {short description of image}
    Click Next. Then accept the default “install root directory” as C:\cygwin.
    {short description of image}
    Click Next. Then accept the default “local package directory” as C:\temp.
    {short description of image}
    Click Next. Then select “Direct Connection”.
    {short description of image}
    Click Next. Then select a download site. I used http://mirrors.rcn.net .
    {short description of image}
    Click Next. You will see the "Select Packages" dialog.

  8. NOTE: This step is very important.

    Move the mouse on the Devel entry and click until the selector reads Install.

    {short description of image}
    Repeat this step with the Net package. (You want to install both Devel and Net!)
    Then click Next. You will see a long succession of dialogs such as this one: 
    {short description of image}
    After quite a long time, you will start seeing dialogs such as this one:
    {short description of image}
    Finally, you will get this dialog:
    {short description of image}
    Click Next to see:
    {short description of image}
    Click Ok.
  9. NOTE: This step is for Windows XP, 2000, or NT only. If you have Windows 95, 98, or Millennium (ME), go to step 10 instead.

    Now skip step 10 and go to step 11.
  10. This step is for Windows 95, 98 or ME only. If you have Windows XP, 2000, or NT, then skip this step and go to step 11.

    Return to the shell window. Type
    edit c:\autoexec.bat
    You will see an editor window, somewhat like this:
    {short description of image}
    Locate the line that starts with PATH= and insert the string
    ;c:\cygwin\bin
    after the C:\WINDOWS and ;C:\WINDOWS\COMMAND statement. Check that the semicolons are correct. Do not insert a n y   a d d i t o n a l   s p a c e s ! ! ! Afterwards, the PATH statement should look somewhat like this:
    {short description of image}
    Now select File->Save and File->Exit. Reboot your computer. 
  11. Test that Cygwin is properly installed. Open up a new shell window (as described in step 1). Type
    gcc --version
    Did you get a string similar to the one below? Congratulations—you have just reached level 3.