Cygwin (pronounced /?s?ɡw?n/) is a collection of tools originally developed by Cygnus Solutions to provide in Microsoft Windows a command line and programming interface familiar to Unix users. Programs supported by Cygwin work well on Windows NT, Windows 2000, Windows XP, and Windows Vista, and some run acceptably on Windows 9x.
While Cygwin provides programming language header files and libraries making it possible to recompile or port Unix applications for use on computers running Microsoft Windows operating systems, it does not provide binary executable programs capable of running without Cygwin installed.
Cygwin is released under the GNU General Public License; it is free software. It is maintained by employees of Red Hat, NetApp and many other volunteers. Corinna Vinschen and Christopher Faylor are currently the managers of the Cygwin development team.
Cygwin consists of a library that implements the POSIX system call API in terms of Win32 system calls, a GNU development toolchain (such as GCC and GDB) to allow software development, and a large number of application programs equivalent to those on the Unix system. Many Unix programs have been ported to Cygwin, including the X Window System, KDE, GNOME, Apache, and TeX. Cygwin permits installing inetd, syslogd, sshd, Apache, and other daemons as standard Windows services, allowing Microsoft Windows systems to emulate Unix and Linux servers.
Cygwin programs are installed by running Cygwin's "setup" program, which downloads the necessary program and feature package files from repositories on the Internet. Setup can install, update, and remove programs and their source code packages. A full installation may cost up to about 4 GB in the hard disk.
Efforts to reconcile concepts that differ between Unix and Windows systems include:
fopen()without specifying text or binary. Programs installed by Cygwin's setup program always open files in binary mode when appropriate, thus avoiding the problem.) Disk drives (
D:, etc.) are also denominated
/cygdrive/d, etc. Windows network paths of the form
\\HOST\SHARE\FILEare mapped to
rmdeletes the linked file instead of the link itself. Old Cygwin versions handled symbolic links using plain text files with hidden attribute set and a single line of text, pointing to the destination file or directory.
/etc/groupare provided that include pointers to the Windows equivalent SID's (in the GECOS field), allowing for mapping between Unix and Windows users and groups.
The version of gcc that comes with Cygwin has various extensions for creating Windows DLLs, specifying whether a program is a windowing or console mode program, adding resources, etc. It also provides support for compiling MinGW-compatible executables (that is, executables that do not require Cygwin to be installed to run, or more specifically, executables that don't require Cygwin's
CYGWIN1.DLL, which provides the POSIX compatibility layer).
Red Hat normally licenses the Cygwin library under the GNU General Public License with an exception to allow linking to any free software whose license conforms to the Open Source Definition. Red Hat also sells commercial licenses to those who wish to redistribute programs that use the Cygwin library under proprietary terms.
Cygwin began in 1995 as a project of Steve Chamberlain, a Cygnus engineer who observed that Windows NT and 95 used COFF as their object file format, and that GNU already included support for x86 and COFF, and the C library newlib. He thought it would be possible to retarget GCC and produce a cross compiler generating executables that could run on Windows. This proved indeed practical and a prototype was quickly developed.
The next step was to attempt to bootstrap the compiler on a Windows system, requiring sufficient emulation of Unix to let the GNU configure shell script run. A Bourne shell-compatible command interpreter, such as bash, was needed and in turn a fork system call emulation and standard input/output. Windows includes similar functionality, so the Cygwin library just needed to provide a POSIX-compatible application programming interface (API) and properly translate calls and manage private versions of data, such as file descriptors.
Initially, Cygwin was called gnuwin32 (not to be confused with the current GnuWin32 project). The name was changed to Cygwin32 to emphasize Cygnus' role in creating it. When Microsoft registered the trademark Win32, the 32 was dropped to simply become Cygwin.
By 1996, other engineers had joined in, because it was clear that Cygwin would be a useful way to provide Cygnus' embedded tools hosted on Windows systems (the previous strategy had been to use DJGPP). It was especially attractive because it was possible to do a three-way cross-compile, for instance to use a hefty Sun workstation to build, say, a Windows-x-MIPS cross-compiler, which was faster than using the PC of the time. Starting around 1998, Cygnus also began offering the Cygwin package as a product of interest in its own right.
Additions to Cygwin
Extensions to Cygwin are available, such as Cygwin/X, a port of the X Window System, and in turn, the KDE Desktop as KDE on Cygwin. However KDE on Cygwin has been phased out as KDE 4 is being ported natively on Windows.
Alternatives to Cygwin
Several open-source and proprietary alternatives are available for people who need simultaneous access to both MS Windows and UNIX environments on the same hardware.
Other UNIX emulators for Windows
Toolsets like Microsoft Windows Services for UNIX, MKS Toolkit, UnxUtils, GnuWin32 and UWIN aim to provide a complete POSIX like environment, as does Cygwin. They implement at least a shell, several utilities, including the familiar UNIX compiler tools, including make and the cc commandline interface to the C programming environment. UnxUtils only provides a subset, as it restricts itself to use only the features provided by the Microsoft C Runtime environment.
Windows emulation on Linux/Unix
A radically different approach to providing Linux/Unix and Windows functionality on the same computer is available with Wine, which is a re-implementation of the Windows API and toolset for Linux and similar systems, while virtualization engines like VMware and Xen allow Windows and Linux or UNIX to run concurrently on top of a hypervisor microkernel. Finally, Cooperative Linux was created to run just Windows and Linux simultaneously on the same hardware.
Cygwin/X is an implementation of the X Window System that runs under Microsoft Windows. It is part of the Cygwin project, and is installed using Cygwin's standard setup system. As with the rest of Cygwin, Cygwin/X is free software, licensed under the GNU General Public License (GPL).
Cygwin/X can run "rootless" - meaning it allows X applications to draw their windows directly onto the normal Windows desktop, rather than into an enclosing root window.
Cygwin/X can either execute local applications of UNIX type on the local machine, or connect to a remote computer where a Unix-like operating system is running.
XWinLogon is an interface to the Cygwin/X Server (The graphical interface of an X Window System) to allow the user to easily connect to a Unix/Linux box from Windows computer. The XWinLogon system is free and stable.
XWinLogon has a Windows installer that makes installation easy. This installer copies the required packages of Cygwin and the frontend window that can be used to easily start an X session on a remote computer.
A known problem with XWinLogon is that it conflicts with an existing Cygwin installation.