词条 | Cygwin |
释义 |
| name = Cygwin | logo = Cygwin logo.svg | logo caption = | screenshot = Cygwin X11 rootless WinXP.png | caption = Running Cygwin, including Cygwin/X, under Windows XP | collapsible = | author = Cygnus Solutions | developer = Cygnus Solutions, Red Hat, others | released = {{start date and age|1995}} | latest release version = 3.0.3-1[1] | latest release date = {{start date and age|2019|03|09}} | operating system = Microsoft Windows | programming language = C/C++ | genre = Compatibility layer, C standard library | license = GNU LGPLv3 }} Cygwin ({{IPAc-en|ˈ|s|ɪ|ɡ|w|ɪ|n}} {{respell|SIG|win}}[2]) is a POSIX-compatible environment that runs natively on Microsoft Windows. Its goal is to allow programs of Unix-like systems to be recompiled and run natively on Windows with minimal source code modifications by providing them with the same underlying POSIX API they would expect in those systems. The Cygwin installation directory behaves like the root and follows a similar directory layout to that found in Unix-like systems, with familiar directories like /bin, /home, /etc, /usr, /var available within it, and includes by default hundreds of programs and command-line tools commonly found in the Unix world, plus the terminal emulator Mintty which is the default command-line interface tool provided to interact with the environment. 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 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. Cygwin was originally developed by Cygnus Solutions, which was later acquired by Red Hat, to port the Gnu/Linux toolchain to Win32, including the GNU Compiler Suite. Rather than rewrite all the tools to use Win32 runtimes, Cygwin implemented a POSIX compatible runtime as a DLL.[3] It is free and open-source software, released under the GNU Lesser General Public License version 3.[4] Today it is maintained by employees of Red Hat, NetApp and many other volunteers. DescriptionCygwin 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 running of a large number of application programs equivalent to those on Unix systems. Programmers have ported many Unix, GNU, BSD and Linux programs and packages to Cygwin, including the X Window System, K Desktop Environment 3, GNOME,[5] 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 36 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:
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 Cygwin is used heavily for porting many popular pieces of software to the Windows platform. It is used to compile Sun Java, LibreOffice, and even web server software like Lighttpd and Hiawatha.[9] Red Hat normally licenses the Cygwin library under the GNU Lesser General Public License version 3 with an exception to allow linking to any free and open-source software whose license conforms to the Open Source Definition[10] (less strict than the Free Software Definition). Red Hat also sells commercial licenses to those who wish to redistribute programs that use the Cygwin library under proprietary terms.[10][11] HistoryCygwin 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 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 Microsystems 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 1998. Christopher Faylor was the project lead from 1998 to mid-2014. Corinna Vinschen became co-lead since{{clarify|date=June 2012}} early 2004 when Faylor left Red Hat and has been lead since mid-2014, when Faylor withdrew from active participation in the project.[12] Features{{unreferenced section|date=December 2011}}Cygwin's default package selection is fairly small, containing little more than the bash shell and the core file manipulation utilities expected of a Unix command line. Additional packages are available as optional installs from within Cygwin's package manager ("setup-x86.exe" – 32bit & "setup-x86_64.exe" – 64bit). These include (among many others):
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 with both local and remote programs. Cygwin ships with a fairly small number of X applications, for example:
In addition to the low-level Xlib/XCB libraries 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 GNOME and K Desktop Environment 3 as well as the MySQL database and the PHP scripting language. Alternative Windows/Unix integration toolsSeveral open-source and proprietary alternatives provide simultaneous access to both Windows and UNIX environments on the same hardware. Toolsets like Windows Subsystem for Linux, 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 that acts a wrapper around a supported C compiler. SFU also includes the GCC compiler. MinGW provides a native software port of the 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 derives 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.[13]Numerous virtualization solutions 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 (abbreviated 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",[14] the full Wine product supports executing unmodified Windows binaries. References1. ^{{cite web |url=https://cygwin.com/ml/cygwin-announce/2019-03/msg00008.html|title=Updated: Cygwin 3.0.3-1}} 2. ^{{Cite web | url = http://cygwin.com/ml/cygwin/2004-09/msg00702.html | title = Re: How do you pronounce it? | author = Larry Hall | date = 2004-09-14 | accessdate = 2007-10-10}} 3. ^{{Cite web|url=https://discuss.howtogeek.com/t/solved-linux-subsystem-vs-cygwin-vs-mobaxterm/56366|title=(Solved) Linux Subsystem vs Cygwin vs MobaXterm|date=2017-01-24|website=Tech Help Forum by How-To Geek|language=en|access-date=2019-03-15}} 4. ^{{cite web|title=Cygwin library now available under GNU Lesser General Public License|url=https://www.redhat.com/en/about/blog/cygwin-library-now-available-under-gnu-lesser-general-public-license|website=redhat.com}} 5. ^{{cite web|url=http://sourceware.org/cygwinports/|title=Cygwin Ports|publisher=|accessdate=2 May 2015}} 6. ^{{cite web| title = Cygwin FAQ: How is fork() implemented? | url = https://www.cygwin.com/faq.html#faq.api.fork| accessdate = Oct 10, 2010}} 7. ^{{cite web| title = Highlights of Cygwin Functionality: Process Creation | url = http://cygwin.com/cygwin-ug-net/highlights.html#ov-hi-process| accessdate = Dec 24, 2014}} 8. ^{{Cite mailing list| last = Blake| first = Eric| title = Bash doesn't launch the applications directly| mailinglist = Cygwin project| date = Jan 15, 2009| url = http://www.cygwin.com/ml/cygwin/2009-01/msg00461.html| accessdate = Oct 10, 2010}} 9. ^Windows package of Hiawatha Webserver compiled via Cygwin 10. ^1 {{cite web | url = http://cygwin.com/licensing.html | title = What are the licensing terms? | archiveurl = https://www.webcitation.org/query?url=http%3A%2F%2Fcygwin.com%2Flicensing.html&date=2012-07-30 | archivedate=2012-07-30 |work = Cygwin}} 11. ^{{cite web|url=http://www.redhat.com/services/custom/cygwin/|title=Cygwin| archiveurl = https://www.webcitation.org/query?url=http%3A%2F%2Fwww.redhat.com%2Fservices%2Fcustom%2Fcygwin%2F&date=2012-07-30 |archivedate=2012-07-30|publisher=Red Hat}} 12. ^{{cite web|url=https://sourceware.org/ml/cygwin/2014-07/msg00392.html|title=Christopher Faylor – Withdrawing from the project|publisher=|accessdate=2 May 2015}} 13. ^{{cite web|url=http://mingw.org/wiki/MSYS|title=MSYS|publisher=|accessdate=2 May 2015}} 14. ^{{cite web|title=Cygwin homepage section "What Cygwin Isn't?"|url=http://cygwin.com/|publisher=Cygwin}} External links{{wikibooks}}
10 : Compatibility layers|Computer 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 |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。