Cygwin
   HOME

TheInfoList



OR:

Cygwin ( ) is a
POSIX The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
-compatible programming and
runtime environment In computer programming, a runtime system or runtime environment is a sub-system that exists both in the computer where a program is created, as well as in the computers where the program is intended to be run. The name comes from the compile ...
that runs natively on
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
. Under Cygwin,
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
designed for
Unix-like A Unix-like (sometimes referred to as UN*X or *nix) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Unix-li ...
operating systems may be compiled with minimal modification and executed. The Cygwin installation has a directory layout that is similar to the root file system of Unix-like systems, with familiar directories, such as /bin, /home, /etc, /usr, and /var. Cygwin installs with hundreds of command-line tools and other programs commonly found on a Unix-like system. Additionally, many applications may be installed from a packaging system. The terminal emulator
Mintty mintty is a free and open source terminal emulator for Cygwin, the Unix-like environment for Windows. It features a native Windows user interface and does not require a display server; its terminal emulation is aimed to be compatible with ...
is the default
command-line interface A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
provided to interact with the environment. Cygwin provides native integration of Windows-based applications. 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 in the form of a C standard library 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 In software design, the look and feel of a graphical user interface comprises aspects of its design, including elements such as colors, shapes, layout, and typefaces (the "look"), as well as the behavior of dynamic elements such as buttons, box ...
. Cygwin is free and open-source software, released under the GNU Lesser General Public License version 3. It was originally developed by
Cygnus Solutions Cygnus Solutions, originally Cygnus Support, was founded in 1989 by John Gilmore, Michael Tiemann and David Henkel-Wallace to provide commercial support for free software. Its tagline was: ''Making free software affordable''. For years, employe ...
, which was later acquired by Red Hat (now part of IBM), to port the Linux toolchain to Win32, including the GNU Compiler Suite. Rather than rewrite the tools to use the Win32 runtime environment, Cygwin implemented a POSIX-compatible environment in the form of a dynamic-link library (DLL).


Description

The Cygwin environment is provided in two versions; the full 64-bit version and a stripped down 32-bit version that is slowly being phased out. Cygwin consists of a library that implements the
POSIX The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
system call API in terms of Windows system calls to enable running of a large number of application programs equivalent to those on
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
systems, and a GNU development toolchain (including GCC and GDB) to allow software development. Programmers have ported many Unix, GNU, BSD and
Linux Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
programs and packages to Cygwin, including the X Window System,
K Desktop Environment 3 K Desktop Environment 3 is the third series of releases of the K Desktop Environment (after that called ''KDE Software Compilation''). There are six major releases in this series. After the release of KDE 4, version 3.5 was forked into the Trini ...
, GNOME, Apache, and TeX. Cygwin permits installing
inetd inetd (internet service daemon) is a super-server daemon on many Unix systems that provides Internet services. For each configured service, it listens for requests from connecting clients. Requests are served by spawning a process which runs the ...
,
syslogd In computing, syslog is a standard for message logging. It allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them. Each message is labeled with a facility code, ...
, sshd, Apache, and other daemons as standard
Windows service In Windows NT operating systems, a Windows service is a computer program that operates in the background. It is similar in concept to a Unix daemon. A Windows service must conform to the interface rules and protocols of the Service Control Manag ...
s, 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. As mentioned, there are two versions of this setup program, one for 32-bit versions of the Cygwin DLL, and corresponding applications, and one for 64-bit versions. Setup can install, update, and remove programs and their source code packages. A complete installation will take in excess of 90 GB of hard disk space, but usable configurations may require as little as 1 or 2 GB. Efforts to reconcile concepts that differ between Unix and Windows systems include: * A Cygwin-specific version of the Unix mount command allows mounting Windows paths as "filesystems" in the Unix file space. Initial mount-points can be configured in
/etc/fstab fstab (after ''file systems table'') is a system file commonly found in the directory /etc on Unix and Unix-like computer systems. In Linux, it is part of the util-linux package. The fstab file typically lists all available disk partitions and ...
, which has a format very similar to 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 Conversion or convert may refer to: Arts, entertainment, and media * "Conversion" (''Doctor Who'' audio), an episode of the audio drama ''Cyberman'' * "Conversion" (''Stargate Atlantis''), an episode of the television series * "The 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 encoding Character encoding is the process of assigning numbers to graphical characters, especially the written characters of human language, allowing them to be stored, transmitted, and transformed using digital computers. The numerical values tha ...
s, whereby the
UTF-8 UTF-8 is a variable-length character encoding used for electronic communication. Defined by the Unicode Standard, the name is derived from ''Unicode'' (or ''Universal Coded Character Set'') ''Transformation Format 8-bit''. UTF-8 is capable of e ...
Unicode Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
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 letter In computer data storage, drive letter assignment is the process of assigning alphabetical identifiers to volumes. Unlike the concept of UNIX mount points, where volumes are named and located arbitrarily in a single hierarchical namespace, driv ...
s map 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. * Cygwin supports POSIX symbolic links, representing them as plain-text files with the system attribute set. Cygwin 1.5 represented them as Windows Explorer shortcuts, but this was changed for reasons of performance and POSIX correctness. Cygwin also recognises NTFS junction 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 POSIX 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 The gecos field, or GECOS field is a field in each record in the /etc/passwd file on Unix and similar operating systems. On UNIX, it is the 5th of 7 fields in a record. It is typically used to record general information about the account or its u ...
), 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 Spawn or spawning may refer to: * Spawn (biology), the eggs and sperm of aquatic animals Arts, entertainment, and media * Spawn (character), a fictional character in the comic series of the same name and in the associated franchise ** '' Spawn: A ...
functions declared in the Windows-specific process.h header). * The Cygwin DLL contains a console driver that emulates a Unix-style
terminal Terminal may refer to: Computing Hardware * Terminal (electronics), a device for joining electrical circuits together * Terminal (telecommunication), a device communicating over a line * Computer terminal, a set of primary input and output devi ...
within the Windows console. Cygwin's default user interface is the
bash Bash or BASH may refer to: Arts and entertainment * ''Bash!'' (Rockapella album), 1992 * ''Bash!'' (Dave Bailey album), 1961 * '' Bash: Latter-Day Plays'', a dramatic triptych * ''BASH!'' (role-playing game), a 2005 superhero game * "Bash" ('' ...
shell running in the Cygwin console. * The DLL also implements
pseudo terminal In some operating systems, including Unix and Linux, a pseudoterminal, pseudotty, or PTY is a pair of pseudo-device endpoints (files) which establish asynchronous, bidirectional communication ( IPC) channel (with two ports) between two or mor ...
(pty) devices. Cygwin ships with a number of terminal emulators that are based on them, including
mintty mintty is a free and open source terminal emulator for Cygwin, the Unix-like environment for Windows. It features a native Windows user interface and does not require a display server; its terminal emulation is aimed to be compatible with ...
, 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. However, programmers need to be careful 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 provided by cross-compilers contributed by the
MinGW-w64 Mingw-w64 is a free and open source software development environment to create (cross-compile) Microsoft Windows PE applications. It was forked in 2005–2010 from MinGW (''Minimalist GNU for Windows''). Mingw-w64 includes a port of the GN ...
project. Cygwin is used heavily for porting many popular pieces of software to the Windows platform. It is used to compile Sun
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
, LibreOffice, and even web server software like Lighttpd and Hiawatha. The Cygwin API library is licensed under the GNU Lesser General Public License version 3 (or later) with an exception to allow linking to any free and open-source software whose license conforms to the Open Source Definition (less strict than the Free Software Definition).


History

Cygwin began in 1995 as a project of Steve Chamberlain, a Cygnus engineer who observed that Windows NT and 95 used
COFF The Common Object File Format (COFF) is a format for executable, object code, and shared library computer files used on Unix systems. It was introduced in Unix System V, replaced the previously used a.out format, and formed the basis for e ...
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 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 A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file man ...
run. A Bourne shell-compatible command interpreter, such as
bash Bash or BASH may refer to: Arts and entertainment * ''Bash!'' (Rockapella album), 1992 * ''Bash!'' (Dave Bailey album), 1961 * '' Bash: Latter-Day Plays'', a dramatic triptych * ''BASH!'' (role-playing game), a 2005 superhero game * "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 The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming in ...
-compatible
application programming interface An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
(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 The G''nu''W''in''32 project provides native ports in the form of executable computer programs, patches, and source code for various GNU and open source tools and software, much of it modified to run on the 32-bit Windows platform. The ports inc ...
project). The name was changed to Cygwin32 to emphasize Cygnus' role in creating it. When
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
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 Microsystems Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, t ...
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 to 1999. Christopher Faylor was the project lead from 1999 to mid-2014. Corinna Vinschen became co-lead since 2004 when Faylor left Red Hat and has been lead since mid-2014, when Faylor withdrew from active participation in the project. From June 23, 2016 the Cygwin library version 2.5.2 was licensed under the GNU Lesser General Public License (LGPL) version 3, so is now possible to link against closed source applications. Before this was available there were two possibilities: to release the source code of the application or buy a Cygwin license to release a closed source application.


Features

Cygwin's base package selection is fairly small (about 100 MB), containing little more than the
bash Bash or BASH may refer to: Arts and entertainment * ''Bash!'' (Rockapella album), 1992 * ''Bash!'' (Dave Bailey album), 1961 * '' Bash: Latter-Day Plays'', a dramatic triptych * ''BASH!'' (role-playing game), a 2005 superhero game * "Bash" ('' ...
(interactive user) and
dash The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
(installation) shells and the core file and text manipulation utilities expected of a Unix command line. Additional packages are available as optional installs from within the Cygwin Setup program and package manager ("setup-x86_64.exe" – 64bit). These include (from over 12000 others): * Shells (i.e. command line interpreters):
bash Bash or BASH may refer to: Arts and entertainment * ''Bash!'' (Rockapella album), 1992 * ''Bash!'' (Dave Bailey album), 1961 * '' Bash: Latter-Day Plays'', a dramatic triptych * ''BASH!'' (role-playing game), a 2005 superhero game * "Bash" ('' ...
,
dash The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
,
fish Fish are Aquatic animal, aquatic, craniate, gill-bearing animals that lack Limb (anatomy), limbs with Digit (anatomy), digits. Included in this definition are the living hagfish, lampreys, and Chondrichthyes, cartilaginous and bony fish as we ...
,
pdksh KornShell (ksh) is a Unix shell which was developed by David Korn at Bell Labs in the early 1980s and announced at USENIX on July 14, 1983. The initial development was based on Bourne shell source code. Other early contributors were Bell ...
, tcsh, zsh,
mksh KornShell (ksh) is a Unix shell which was developed by David Korn at Bell Labs in the early 1980s and announced at USENIX on July 14, 1983. The initial development was based on Bourne shell source code. Other early contributors were Bell L ...
* File and system utilities: coreutils, findutils, util-linux * Text utilities: grep, sed, diff,
patch Patch or Patches may refer to: Arts, entertainment and media * Patch Johnson, a fictional character from ''Days of Our Lives'' * Patch (''My Little Pony''), a toy * "Patches" (Dickey Lee song), 1962 * "Patches" (Chairmen of the Board song ...
, awk * Terminals:
mintty mintty is a free and open source terminal emulator for Cygwin, the Unix-like environment for Windows. It features a native Windows user interface and does not require a display server; its terminal emulation is aimed to be compatible with ...
, rxvt, screen * Editors: ed,
emacs Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
, joe, mined, nano, vim * Remote login: ssh, rsh,
telnet Telnet is an application protocol used on the Internet or local area network to provide a bidirectional interactive text-oriented communication facility using a virtual terminal connection. User data is interspersed in-band with Telnet control i ...
* Remote file transfer/synchronization: ftp, scp, rsync, unison, rtorrent * Compression/archiving:
tar Tar is a dark brown or black viscous liquid of hydrocarbons and free carbon, obtained from a wide variety of organic materials through destructive distillation. Tar can be produced from coal, wood, petroleum, or peat. "a dark brown or black bi ...
, gzip, bzip2, lzma, zip * Text processing: TeX, groff, Ghostscript * Programming languages: C, C++, Objective-C, Fortran, Gambas,
Perl Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offic ...
, Python,
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called ...
, Tcl,
Ada Ada may refer to: Places Africa * Ada Foah, a town in Ghana * Ada (Ghana parliament constituency) * Ada, Osun, a town in Nigeria Asia * Ada, Urmia, a village in West Azerbaijan Province, Iran * Ada, Karaman, a village in Karaman Province, T ...
,
CLISP In computing, CLISP is an implementation of the programming language Common Lisp originally developed by Bruno Haible and Michael Stoll for the Atari ST. Today it supports the Unix and Microsoft Windows operating systems. CLISP includes an ...
,
Scheme A scheme is a systematic plan for the implementation of a certain idea. Scheme or schemer may refer to: Arts and entertainment * ''The Scheme'' (TV series), a BBC Scotland documentary series * The Scheme (band), an English pop band * ''The Schem ...
, OCaml, Prolog * Development tools: make, autotools,
flex Flex or FLEX may refer to: Computing * Flex (language), developed by Alan Kay * FLEX (operating system), a single-tasking operating system for the Motorola 6800 * FlexOS, an operating system developed by Digital Research * FLEX (protocol), a com ...
,
bison Bison are large bovines in the genus ''Bison'' (Greek: "wild ox" (bison)) within the tribe Bovini. Two extant and numerous extinct species are recognised. Of the two surviving species, the American bison, ''B. bison'', found only in North A ...
, doxygen * Version control systems: cvs,
subversion Subversion () refers to a process by which the values and principles of a system in place are contradicted or reversed in an attempt to transform the established social order and its structures of power, authority, hierarchy, and social norms ...
, git, mercurial * Servers: Apache, BIND,
PostgreSQL PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the ...
,
Pure-FTPd Pure-FTPd is a free (BSD license) FTP Server with a strong focus on software security. It can be compiled and run on a variety of Unix-like computer operating systems including Linux, OpenBSD, NetBSD, FreeBSD, DragonFly BSD, Solaris, Tru64, Dar ...
, OpenSSH, telnetd, exim, UW IMAP * Clients: Mutt (email), Lynx (web), Irssi (IRC), tin (newsgroups) The
Cygwin/X 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. Cygwin/X is free software, licensed under the X11 License. Cygwin/ ...
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 with both local and remote programs. Cygwin/X supports over 500 packages including major X window managers, desktop environments, and applications, for example: * Terminals: rxvt-unicode, xterm * Editors: emacs-X11, gvim * Text processors/viewers: LyX,
xpdf Xpdf is a free and open-source PDF viewer for operating systems supported by the Qt toolkit. Versions prior to 4.00 were written for the X Window System and Motif. Functions Xpdf runs on nearly any Unix-like operating system. Binaries are a ...
, xdvi * Web browsers: epiphany, konqueror, links, lynx, midori, qupzilla, w3m In addition to the low-level Xlib/
XCB XCB (''X protocol C-language Binding'') is a library implementing the client-side of the X11 display server protocol. XCB is written in the C programming language and distributed under the MIT License. The project was started in 2001 by ...
libraries for developing X applications, Cygwin ships with various higher-level and cross-platform
GUI The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
frameworks, including
GTK+ GTK (formerly GIMP ToolKit and GTK+) is a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). It is licensed under the terms of the GNU Lesser General Public License, allowing both free and prop ...
and Qt. The Cygwin Ports project provided many additional packages that were not available in the Cygwin distribution itself. Examples included GNOME and
K Desktop Environment 3 K Desktop Environment 3 is the third series of releases of the K Desktop Environment (after that called ''KDE Software Compilation''). There are six major releases in this series. After the release of KDE 4, version 3.5 was forked into the Trini ...
as well as the
MySQL MySQL () is an open-source relational database management system (RDBMS). Its name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and "SQL", the acronym for Structured Query Language. A relational database ...
database and the PHP scripting language. Most ports have been adopted by volunteer maintainers as Cygwin packages, and Cygwin Ports are no longer maintained.


See also

*


References


External links

* {{Unix-Windows Interoperability Compatibility layers Programming tools Free compilers and interpreters Free emulation software Free software programmed in C Free software programmed in C++ Red Hat software System administration Unix emulators Windows-only free software