Simply put: Cygwin is a set of intermediate portions developed by GNU developers developed in a Windows environment in a Windows environment. You can also understand it as a powerful UNIX simulation tool in the Windows environment. What exactly, mainly look at what you take Cygwin, if you are a developer, then it is a development tool; if you want to learn in a Windows environment, use UNIX systems, it is a UNIX user toolset. Simply put: Cygwin is a set of intermediate portions developed by GNU developers developed in a Windows environment in a Windows environment. You can also understand it as a powerful UNIX simulation tool in the Windows environment. What exactly, mainly look at what you take Cygwin, if you are a developer, then it is a development tool; if you want to learn in a Windows environment, use UNIX systems, it is a UNIX user toolset. Cygwin features a developer, Cygwin provides developers with a total 32-bit application development tool. First, Cygwin can be regarded as a set of tools, which is to run on Windows 9x / NT from the GNU development tools currently used by developers. With the Cygwin toolset, developers, you can directly use some of the operating environments required by UNIX system function calls and procedures. The programmer can call the standard Microsoft Win32API directly in the Windows environment, and can also use the CygWin API to write Win32 console applications, GUI applications. Using Cygwin can easily transfer some important UNIX applications to Win32 environments. The source code for these applications does not require a large change, you can run in a Windows environment. User familiar with the Windows environment, you can understand Cygwin as Dynamic-Linked Library (DLL), which provides a large number of UNIX system calls. At present, the latest release includes all POSIX.1 / 90 calls outside SETUID and MKFIFO, all ANSI C standard calls, and also contains many general BSDs and SVR4 services such as Berkeley Sockets. For ordinary users, Cygwin provides a set of UNIX tools that run it, you can turn your Windows system into a UNIX host. This group of tools include Bash Shell, you can use these tools in an analog UNIX environment, or do not enter the UNIX virtual machine environment, use them directly in Windows DOS command line environments. Which packages have Cygwin contain? 1. Development Kit: Binutils, Bison, BYACC, Dejagnu, Diff, Expect, Flex, GAS, GCC, GDB, ITCL, LD, Libstdc , Make, Patch, TCL, TIX, TK, etc .; 2.Unix tool: ASH, BASH , BZIP2, DIFF, FileUtils, FindUtils, Gawk, GREP, GZIP, LESS, M4, SED, SHELLUTILS, TAR, TEXTUTILS, TIME; 3. Source of package. All the above procedures are available free of charge. Cygwin is a full-featured Win32 application that is a porting layer for UNIX applications, which is fully compatible with Win32 (including Windows 95/98 / NT currently). The project launched in 1995, the main purpose is to transplant the GNU development tool to Win32 system. Download and Install this program (http://sources.redhat.com/cygwin/setup.exe), then run it, it will automatically install the latest version of Cygwin.
If your computer is connected to the Internet, you can choose to install from the Internet (Figure 1), the installer will automatically find the site of the Cygwin package, list dozens of sites, you can choose a nearest site, confirm the installation The first step of the program performs downloads; after the download is complete, automatically start installation, the installation process is fully automated, you only need to enter the installed destination path installed. The entire installation process is about 5 minutes, and the specific machine performance is related. After the installation is complete, a batch file is automatically generated, and an icon is generated on the desktop, click to start running. After using the Cygwin program installation, a batch file is generated in the corresponding installation directory: cygwin.bat, you can run it directly, or run from the desktop. After the program runs, it has entered a virtual UNIX host. It is a complete microix machine. The directory structure is identical to the ordinary UNIX system and includes basic UNIX commands, which can be under this virtual Unix host. run. This is not enough, but amazing is that these orders can also be run directly in Windows command line environments. The following example is run under the DOS interface: c: /> mount c: / / c (Note: A / c mount to the virtual UNIX system) C: /> mount D: / / d (Note: A directory / d of hard disk D mount to virtual Unix machine) C: /> Mount E: / / / cdrom (Note: Put the E disk mount to the virtual UNIX machine / CDROM directory) The role is equivalent to the following UNIX commands: $ mount / dev / hdax / c ## x is a partition, the value is 1, 2, 3 ... Using the regular unix command (note, this is in a regular Windows command line environment Direct use): PS (process view), as shown in Figure 2. Write a small C language program, compile with GCC, running results as shown in Figure 3 (under Windows Command Line). All of the above is directly using the UNIX command in a Windows environment. Of course, these commands can be used under the virtual UNIX machine. This shows that the GCC compiler has little different from the compiler under UNIX. Cygwin also provides its own compilation. If you want to compile your own cygwin, you can select the installation source package when you install. In this way, if you want to compile CYGWIN, you can enter the CygWin-1.1.6-1 directory, run configure, make completed compilation of Cygwin (Figure 4). With regard to Cygwin, the URL has a detailed guide: http://cygwin.com/cygwin-ue-net/ cygwin-ug-net.html. Xfree for cygwin x Window is the GUI in the UNIX environment, almost all UNIX versions can run X applications, then this miniature Unix consists of Cygwin can run x applications? Surprisingly: XFree app can run in CygWin! If you are interested, you can find and download XFree for cygwin. It is a X Window system running in a Windows environment and a full free software. From the introduction from the website you can know, it is a product developed by personal.
The current use of Freex86 4.0. With it, those who require X WINDOW in the Windows environment, do not have to spend money to buy a commercial X WINDOW server in a Windows environment. It can run very well. Window Manager is the simplest TWM. The author downloaded the Xfree for Cygwin package, successfully completed installation in NT, and the running effect is not bad. Just when installing: The latest Xfree for cygwin is 4.0.1, you don't forget to download, download a package called XWIN-UPDATE, and install it, otherwise, you may not be able to run x window. To download the installed package is: Xfree86-4.0-dlls.tar.bz2 xfree86-4.0-fonts.tar.bz2 xfree86-4.0-prog.tar.bz2 xfree86-4.0-rgb.tar.bz2 Xfree86-4.0-TWM. TAR.BZ2 XFree86-4.0-xterm.tar.bz2 Xfree86-4.0-xwin.tar.bz2 xwin-update-ex-only.tar.bz2 (that is, this file) You can put all the files in the XC-4-binaries directory Download all, all installed. Installation method: Just copy all of these BZ2 files to the directory you install Cygwin, run cygwin.bat, enter the UNIX environment. The first step: decompression: $ bunzip2 -d * .bz2 Step 2: $ tar -xvf xfree86-4.0.xwin.tar $ tar -xvf xfree86-4.0.dll.tar ... So unwounded above package The TAR automatically places the files in the package to the correct location and does not need to run the installer. After the decompression is completed, the installation is complete. How to run x window? $ Cd / usr / x11r6 / bin $ ./startxwin.bat can start X WINDOW. For more information, please refer to the following URL: http://cygwin.com/xfree/.