Cygwin
Cygwin
Logo of Cygwin
Cygwin X11 rootless WinXP.png
Running Cygwin, including Cygwin/X, under Windows XP
Original author(s) Cygnus Solutions
Developer(s) Cygnus Solutions, Red Hat, others
Initial release 1995
Stable release 1.7.9-1[1] / March 29, 2011; 7 months ago (2011-03-29)
Written in C/C++
Operating system Microsoft Windows
Type Compatibility layer
License GNU GPLv3
Website www.cygwin.com

Cygwin (play /ˈsɪɡwɪn/ sig-win)[2] is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment. Thus it is possible to launch Windows applications from the Cygwin environment, as well as to use Cygwin tools and applications within the Windows operating context.

Cygwin consists of two parts: a dynamic-link library (DLL) as an API compatibility layer providing a substantial part of the POSIX API functionality, and an extensive collection of software tools and applications that provide a Unix-like look and feel.

Cygwin was originally developed by Cygnus Solutions, which was later acquired by Red Hat. It is free and open source software, released under the GNU General Public License version 3. Today it is maintained by employees of Red Hat, NetApp and many other volunteers.

Contents

Description

Cygwin consists of a library that implements the POSIX system call API in terms of Win32 system calls, a GNU development toolchain (including GCC and GDB) to allow software development, and a large number of application programs equivalent to those on Unix systems. Many Unix, GNU, BSD and Linux programs and packages have been ported to Cygwin, including the X Window System, KDE, GNOME,[3] 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 complete installation will take in excess of 8 GB of hard disk space, but usable configurations may require as little as 1 or 2 GBs.

Efforts to reconcile concepts that differ between Unix and Windows systems include:

  • A Cygwin-specific version of the Unix mount command allows Windows paths to be mounted as "filesystems" in the Unix file space. Initial mount points can be configured in /etc/fstab, which has a very similar format as on Unix systems, except that Windows paths appear in place of devices. Filesystems can be mounted in binary mode (by default), or in text mode, which enables automatic conversion between LF and CRLF endings (which only affects programs that open files without explicitly specifying text or binary mode).
  • Cygwin 1.7 introduced comprehensive support for POSIX locales and many character encodings, whereby the UTF-8 Unicode encoding became the default. Windows file names and other identifiers, which are encoded as UTF-16, are automatically converted to and from the selected character encoding.
  • Windows drive letters are mapped to a special directory, so for example C: appears as /cygdrive/c. The /cygdrive prefix can be changed. Windows network paths of the form \\HOST\SHARE\FILE are mapped to //HOST/SHARE/FILE. Windows paths can also be used directly from Cygwin programs, but many programs do not support them correctly, hence this is discouraged.
  • Full-featured /dev and /proc file systems are provided. /proc/registry provides direct filesystem access to the registry.
  • POSIX symbolic links are supported. They are represented as plain text files with the system attribute set. Cygwin 1.5 represented them as Windows Explorer shortcuts, but this has been changed for reasons of performance and POSIX correctness. Cygwin also recognises NTFS junctions points and symbolic links and treats them as POSIX symbolic links, but it does not create them as their semantics are not fully POSIX-compliant.
  • The Solaris API for handling access control lists (ACLs) is supported and maps to the Windows NT ACL system.
  • Special formats of /etc/passwd and /etc/group are provided that include pointers to the Windows equivalent SIDs (in the GECOS field), allowing for mapping between Unix and Windows users and groups.
  • The fork system call for duplicating a process is fully implemented, but it does not map well to the Windows API. For example, the copy-on-write optimization strategy could not be used. As a result, Cygwin's fork is rather slow compared with Linux and others. (That overhead can often be avoided by replacing uses of the fork/exec technique with calls to the spawn functions declared in the Windows-specific process.h header).
  • The Cygwin DLL contains a console driver that emulates a Unix-style terminal within the Windows console. Cygwin's default user interface is the bash shell running in the Cygwin console.
  • The DLL also implements pseudo terminal (pty) devices. Cygwin ships with a number of terminal emulators that are based on them, including mintty, rxvt(-unicode), and xterm. These are more compliant with Unix terminal standards and user interface conventions than the Cygwin console, but are less suited for running Windows console programs.
  • Various utilities are provided for converting between Windows and Unix paths and file formats, for handling line ending (CRLF/LF) issues, for displaying the DLLs that an executable is linked with, etc.
  • Apart from always being linked against the Cygwin DLL, Cygwin executables are normal Windows executables. This means that Cygwin programs have full access to the Windows API and other Windows libraries, which allows gradual porting of programs from one platform to the other. Programmers do need to be careful though about mixing conflicting POSIX and Windows functions.

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. Support for compiling programs that do not require the POSIX compatibility layer provided by the Cygwin DLL used to be included in the default gcc, but is now provided by cross compilers contributed by the MinGW-w64 project.

Cygwin is used heavily for porting many popular pieces of software to the Windows platform. It is used to compile Sun Java, OpenOffice.org, LibreOffice, and even server software, like lighttpd.

Red Hat normally licenses the Cygwin library under the GNU General Public License version 2 with an exception to allow linking to any free and open source 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.

History

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 at the time. In 1999, Cygnus offered Cygwin 1.0 as a commercial product of interest in its own right although subsequent versions have not been released, instead relying on continued open source releases.

Geoffrey Noer was the project lead from 1996-1998. Christopher Faylor has been the project lead since 1998. Corinna Vinschen became co-lead since early 2004 when Faylor left Red Hat.

Features

Cygwin's default package selection is fairly minimal, containing little more than the bash shell and the core file manipulation utilities expected of a Unix command line. A wide range of additional packages are available as optional installs in Cygwin's package manager ("setup.exe"). These include (among much else):

The Cygwin/X project contributes an implementation of the X Window System that allows graphical Unix programs to display their user interfaces on the Windows desktop. This can be used both with local and remote programs. Cygwin ships with a fairly small number of X applications, for example:

In addition to the low-level Xlib library for developing X applications, Cygwin also ships with various higher-level and cross-platform GUI frameworks, including Gtk+ and Qt.

The Cygwin Ports project provides many additional packages that are not available in the Cygwin distribution itself. Examples include the GNOME and KDE desktop environments as well as the MySQL database and the PHP scripting language.

Alternatives

Several open-source and proprietary alternatives are available for simultaneous access to both Windows and UNIX environments on the same hardware.

Toolsets like Microsoft Windows Services for UNIX (SFU), UWIN, MKS Toolkit for Enterprise Developers and Hamilton C shell also aim to provide a Unix-like user and development environment. They implement at least a shell and a set of the most popular utilities. Most include the familiar GNU and/or Unix development tools, including make, yacc, lex and a cc command which acts a wrapper around a supported C compiler. SFU also includes the GCC compiler.

MinGW is a native software port of the GNU Compiler Collection (GCC) to Microsoft Windows, along with a set of freely distributable import libraries and header files for the Windows API. MinGW allows developers to create native Microsoft Windows applications. In addition, a component of MinGW known as MSYS (Minimal SYStem), which was derived from Cygwin version 1.3.3, provides a minimal Unix-like shell environment including bash and a selection of POSIX tools sufficient to enable autoconf scripts to run.[4]

In addition, there are numerous virtualization solutions that provide x86 platform virtualization to run Windows and Unix-like operating systems simultaneously on the same hardware, but without the integration of the environments that Cygwin provides. Some, like VirtualBox and VMware Player run on Windows and Linux hosts and can run many other operating systems. Cooperative Linux (in short coLinux) runs a full, but modified Linux kernel like a driver under Windows, effectively making Windows and Linux two coroutines, using cooperative multitasking to switch between them.

Winelib, a part of the Wine project, is the inverse of Cygwin - it is a free and open source compatibility layer for Unix-like operating systems on the x86 or x86-64 architecture that can allow programs written for Microsoft Windows to run on Unix-like operating systems. Unlike Cygwin which requires "You rebuild your application from source if you want it to run on Windows",[5] the full Wine product supports executing unmodified Windows binaries.

See also

References

External links



Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Cygwin — на Windows XP Тип Эмулятор …   Википедия

  • Cygwin — Cygwin …   Deutsch Wikipedia

  • Cygwin — Cygwin …   Wikipédia en Français

  • Cygwin — Saltar a navegación, búsqueda Cygwin Ejecutando Cygwin en Windows XP Desarrollador …   Wikipedia Español

  • Cygwin — es una colección de herramientas desarrollada por Cygnus Solutions para proporcionar un comportamiento similar a los sistemas Unix en Windows. Su objetivo es portar software que ejecuta en sistemas POSIX a Windows con una recompilación a partir… …   Enciclopedia Universal

  • Cygwin — noun a UNIX like environment for …   Wiktionary

  • Cygwin — ● np. ►APPLI Ensemble de logiciels libres permettant de compiler des applications en provenance du monde Unix sous Windows. Encore une fois, ils n ont pas pensé à la prononciation française …   Dictionnaire d'informatique francophone

  • 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… …   Wikipedia

  • Cygwin/X — est une implémentation du système X Window qui fonctionne sur Microsoft Windows. C est un logiciel libre. Cygwin/X fait partie du projet Cygwin, et peut être installé en utilisant le système standard d installation de Cygwin. Cygwin/X utilisait à …   Wikipédia en Français

  • KDE on Cygwin — is the port of Qt and KDE desktop environment (both of which are commonly distributed natively in Linux operating systems) to Windows using Cygwin, the POSIX emulation layer for Windows, and the Cygwin XFree86 server. It helps Wintel computers to …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”