Cygwin

 make your penguin happy with
 real scripting ability
(Bash! Perl! curl! more!)




Overview

Cygwin is a port of many GNU tools from Linux to Windows. Your first issue is "why the hell do I wanna run Cygwin". If you pass that point, the later portions of this note say how to download it etc.


When cygwin is installed on your Windows machine, you will have the icon, shown at the left, on your desktop; it is shortcut to the Bash shell. Double-click it to start Bash. The following shows simple shell commands (in white); green is the prompt.


I don't know of any true bugs in cygwin and I've never seen it crash or corrupt a system. There is however, an annoying difference in text file conventions. Window's editors, Wordpad etc, will try to determine if a file is in one of the oldest "DOS" formats which terminated lines with CR (Carriage Return, \r) and LF (LineFeed, \n) while Linux-based sofware only uses the more modern LF only. A DOS type text file, used for scripting, will be rejected by the Bash shell and the error message isn't very helpful. The fix is to pass the script through a cygwin tool, 'dos2unix', which will remove the CR's.


To start the download (or upgrade), get your browser to fine the website shown below:




Click the indicated button to load Setup.exe. Yes, Windows will complain about running an executable, and will complain a second time that it hasn't the proper lineage. Just let it run.

You'll be asked to "Choose a Download Source":
Install from Internet This will ask you to choose files then it'll download and install exactly those files. The downloaded files will be retained; they are not automatically deleted.
Download without Installing Because the downloaded files can be put on a CD rom and reused, there's a tendency to "want 'em all" - even though you may not want to install all of them on the first machine you're setting up. So this option lets you separate the download and install functions. But you'll have to endure the file choosing operation twice.
Install from local directory If you made a CD (or flash memory stick etc) from an earlier download, this option provides the way to use it. This'll let you put the same version on multiple machines, if that's important. After choosing this option, you'll still have to choose which files to install - but your choices are limited to what you've already downloaded.

Advice: when choosing directories, consider just taking the defaults because that's what you'll see next time when you go to find a package you missed the first time. Such an operation is called "upgrade" although you're just adding to what you've got.

If you choose to download from the Internet, as you must if this is your 1st Cygwin install, you'll have to choose which packages to get. Those choices determine which files are downloaded and installed.

If you have a CD rom made from an earlier download (and thus choose "install from a local directory"), you'll still have to answer the long list of what packages to install; but you're only able to choose from the list previously downloaded.

A screen will ask you to choose a site from which to pull the cygwin files. If you know the name of a local site, great; if not, choose something on your same city, state, country, or planet. If you happen to choose a site which is no longer active, it'll tell you and let you choose another.

NOW things get interesting. The next screen (below) shows an innocent list of Somethings. It turns out each line at this level is like a directory, holding a bunch of compressed files, "packages". You could just accept their default list (hidden in the "categories" but that's almost sure to make you come back again to pick up stuff you wanted (but didn't yet know it).



I suggest you open one/some of these and choose whatever sounds interesting/useful. You might want "vim" (editors) or "perl" etc. The following screen shows how to open a category and choose a package.




file: cygwin.html,