| Cygwin | |
|---|---|
Running Cygwin, includingCygwin/X, underWindows XP | |
| Original authors | Steve Chamberlain,Cygnus Solutions |
| Developers | Cygnus Solutions,Red Hat, Cygwin project volunteers |
| Initial release | October 18, 1995; 30 years ago (1995-10-18) |
| Stable release | |
| Repository | |
| Written in | C/C++ |
| Operating system | Microsoft Windows |
| Type | POSIX standard utilities,POSIX standard library,C standard library,compatibility layer |
| License | GPLv3,LGPLv3[2] |
| Website | cygwin |
Cygwin (/ˈsɪɡwɪn/SIG-win)[3] is afree and open-sourceUnix-likeenvironment andcommand-line interface (CLI) forMicrosoft Windows. The project also provides a software repository containingopen-source packages. Cygwin allowssource code forUnix-like operating systems to be compiled and run on Windows. Cygwin provides native integration of Windows-based applications.
Theterminal emulatormintty is the default command-line interface provided to interact with the environment. The Cygwin installation directory layout mimics theroot file system of Unix-like systems, with directories such as/bin,/home,/etc,/usr, and/var.
Cygwin is released under theGNU Lesser General Public License version 3.[4] It was originally developed byCygnus Solutions,[5][6] which was later acquired byRed Hat (now part ofIBM), to port the GNUtoolchain toWin32, including theGNU Compiler Suite. Rather than rewrite the tools to use the Win32runtime environment, Cygwin implemented aPOSIX-compatible environment in the form of a DLL.[7]
The brand motto is "Get that Linux feeling – on Windows", although Cygwin doesn't have Linux in it.[8]
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.(January 2024) (Learn how and when to remove this message) |
Cygwin began in 1995 as a project of Steve Chamberlain, aCygnus engineer who observed that Windows NT and 95 usedCOFF as theirobject file format, and that GNU already included support forx86 and COFF, and theC librarynewlib. He thought that it would be possible to retargetGCC and produce across compiler generating executables that could run on Windows. A prototype was later developed. Chamberlainbootstrapped the compiler on a Windows system, to emulate Unix to let theGNU configureshell script run.
Initially, Cygwin was calledCygwin32.[6][note 1] WhenMicrosoft registered the trademark Win32, the "32" was dropped to simply becomeCygwin.
In 1999, Cygnus offered Cygwin 1.0 as acommercial product.[9] Subsequent versions have not been released, instead relying on continued open source releases.
Geoffrey Noer was the project lead from 1996 to 1999.[10][11] Christopher Faylor was lead from 1999 to 2004; he left Red Hat and became co-lead with Corinna Vinschen.[12][13] Corinna Vinschen has been the project lead from mid-2014 to date (as of September, 2024).[14]
From June 23, 2016, the Cygwin library version 2.5.2 was licensed under theGNU Lesser General Public License (LGPL) version 3.[15]
Cygwin is provided in two versions: the full64-bit version and a stripped-down32-bit version, whose final version was released in 2022.[16] Cygwin consists of a library that implements thePOSIX system callAPI in terms of Windows system calls to enable the running of a large number of application programs equivalent to those onUnix systems, and aGNU development toolchain (includingGCC andGDB). Programmers have ported theX Window System,K Desktop Environment 3,GNOME,[17]Apache, andTeX. Cygwin permits installinginetd,syslogd,sshd,Apache, and other daemons as standardWindows services. Cygwin programs have full access to theWindows API and other Windows libraries.
Cygwin programs are installed by running Cygwin's "setup"[18] program, which downloads them from repositories on the Internet.
The Cygwin API library is licensed under the GNU Lesser General Public License version 3 (or later), with an exception to allow linking to anyfree and open-source software whose license conforms to theOpen Source Definition.[19]
Cygwin consists of two parts:
Cygwin supports POSIXsymbolic links, representing them as plain-text files with the system attribute set. Cygwin 1.5 represented them asWindows Explorershortcuts, but this was changed for reasons of performance and POSIX correctness. Cygwin also recognisesNTFS junction points and symbolic links and treats them as POSIX symbolic links, but it does not create them. The POSIX API for handlingaccess control lists (ACLs) is supported.[21]
A Cygwin-specific version of the Unixmount command allows mounting Windows paths as "filesystems" in the Unix file space. Initial mount points can be configured in/etc/fstab, 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 automaticconversion betweenLF andCRLF endings (which only affects programs that open files without explicitly specifying text or binary mode).
Cygwin 1.7 introduced comprehensive support for POSIXlocales, and theUTF-8Unicode encoding became the default.
Thefork system call for duplicating a process is fully implemented, but thecopy-on-write optimization strategy could not be used.[22][23][24]
Cygwin's default user interface is thebash shell running in themintty terminal emulator.[25] The DLL also implementspseudo terminal (pty) devices, and Cygwin ships with a number ofterminal emulators that are based on them, includingrxvt/urxvt andxterm. The version of GCC that comes with Cygwin has various extensions for creating Windows DLLs, such as specifying whether a program is a windowing or console-mode program. 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 as of 2014[update], it is provided by cross-compilers contributed by theMinGW-w64 project.
Cygwin's base package selection is approximately 100MB,[26] containing thebash (interactive user) anddash (installation)shells and the core file and text manipulation utilities. Additional packages are available as optional installs from within the Cygwin "setup" program and package manager ("setup-x86_64.exe" – 64 bit).[27] The Cygwin Ports project provided[when?] additional packages that were not available in the Cygwin distribution itself. Examples includedGNOME,K Desktop Environment 3,MySQL database, and thePHP scripting language. Most ports have been adopted by volunteer maintainers as Cygwin packages, and Cygwin Ports are no longer maintained. Cygwin ships withGTK+ andQt.
TheCygwin/X project allows graphicalUnix programs to display their user interfaces on the Windows desktop for both local and remote programs.