Cygwin, a UNIX environment for Windows

For all of you who are need to use Microsoft operating systems, but want to have Open Source development tools there is an excellent solution. The Win32 console is relatively weak compared to the Unix operating system. If you need to work with Microsoft Word, Excel or PowerPoint you don't have any real alternative to Windows 98, NT or XP. But you can make your life easier with the great toolkit provided by CYGNUS. This toolkit offers access to your common UNIX commands in a MS Windows environment.

The Cygwin tools are Win32 ports of the popular GNU development tools for Windows XP, 2000, NT, 98, and 95. They function through the use of the Cygwin library which provides a UNIX-like API on top of the Win32 API.

Use the tools to:

Cygwin user guide

Cygwin FAQ (local copy)

How do you install it (to get an almost UNIX like behavior)?

Go to http://sources.redhat.com/cygwin/, click the Install now button and follow the instructions. The complete Cygwin user guide is here. This is the Cygwin FAQ.

A step to step introduction for Xfree for Cygwin is here. Add-on programs can be found on the CygUtils page. An overview of the applications shipped with the current cygwin distribution is here

This is the best German cygwin mirror

 

Applications

Ported applications

GNU online manuals

Download RPM binary and source code (local copy)

GNU Win32 project

X-Windows with Cygnus

 

Old Cygnus Versions (you should not use them ;-)):

Core Files

Grab the latest win32 toolkit and run the setup program. The complete toolkit will be installed in c:\cygnus as a default. After the installation go to Sergey Okhapkins site and download the latest coolview.tar.bz2 file. Apply this patch to the Win32 archive in c:\cygnus. It will replace the original C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygwin1.dll (as of version B20).

Now check out Andy Pipers - ports . He has an almost complete /usr/local directory and a X11R4 port. Apply the archives to your installation. Take care of adding the new directories to your PATH variable (by adding it to c:\autoexec.bat ). You need a working X11 Server for Win32 as eXceed or xVision if you like to run local X11 commands such as xterm or rxvt.

Variables

The best way to add systemwide variables is to edit c:\autoexec.bat. By doing it this way you ensure that the C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\cygwin1.dll gets all relevant variables.

You should add at least:

A basic PATH: PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;c:\perl\bin;c:\pgp;c:\usr\local\bin;c:\usr\x11r6.4\bin;C:\cygnus\cygwin-b20\H-i586-cygwin32;%PATH%
Your home directory: SET HOME=c:\usr\people\hh
A TERM variable (various commands such as less or mutt depend on it): SET TERM=linux
Your username: SET USER=hh
The CYGWIN variable (tty control): SET CYGWIN=tty

Directory structure

You need a /tmp and a  /etc directory. A lot of programs that are suited for a UNIX like environment check e.g. /etc/passwd with the getpwent(). Inside /etc you should have /etc/passwd (with the corresponding entry to your USER variable) and /etc/group.

After those basic steps you have an almost Linux like version of Win32. You may now compile (or download) various UNIX utilities that work in a Win32 environment like less, vim, ncftp, tcsh, ssh, rsync, etc, ...

Be sure to mount any filesystems (disk drives) in binary mode. You can check the mount status with the mount command.

$ mount
Device Directory Type Flags
c:\usr\local /usr/local native text=binary
f: /f native text=binary
\\.\tape1: /dev/st1 native text!=binary
\\.\tape0: /dev/st0 native text!=binary
\\.\b: /dev/fd1 native text!=binary
\\.\a: /dev/fd0 native text!=binary
f: /desaster native text=binary
d: /d native text=binary
c: / native text=binary
If a device is mounted 
text!=binary you may want to umount it. After the umount mount it with the -b (binary) switch.

Anti Virus Software

Use the standard Win32 anti virus software. There is no direct anti virus support with the CYGWIN project. Heise maintains a list of anti virus software.

virus.gif (10094 bytes)