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's function
For developers, Cygwin provides developers with a total 32-bit 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 Tools: ASH, Bash, BZIP2, DIFF, FileUtils, FindUtils, Gawk, GREP, GZIP, LESS, M4, SED, SHELLUTILS, TAR, TEXTUTILS, TIME
3. Source of each 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 installation
Download 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 Program
One step is downloaded; 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. Use cygwin
After the program is installed, in the corresponding installation directory, a batch file is generated: cygwin.bat, you can run it directly, or run from the desktop.
After the program runs, I will enter a virtual UNIX host directly, it is a complete
The micro Unix machine, the directory structure is identical in the normal UNIX system, and includes basic UNIX commands that can be run under this virtual Unix host. 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: / / / (Note: A / c (name can be other) directory of the hard disk 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)
Its role is equivalent to the following UNIX commands:
$ mount / dev / hdax / c ## x is a partition, the value is 1, 2, 3 ...
Using regular UNIX commands (note, this is direct use in a regular Windows command line environment): 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).
About CygWin, the following URL has a detailed guide: http://cygwin.com/cygwin-ug-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 makes X applications by Cygwin?
Surprisingly: XFree application can run under 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. You can know from the introduction of the website, it is a personal development
product. 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:
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-online.tar.bz2 (that is, this file)
You can download all the files in the XC-4-binaries directory, 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 unlocked the above packages, TAR automatically place 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
You can start x window.
For more information, please refer to the following URL: http://cygwin.com/xfree/.
Transplanted application list
Apache 1.3.9 and PHP-4.0B2
ARPC
CAMP 1.2B1
CD Recording Software
Cygwin B20.1 Released!
Data Plotting Library Dislin 7.3
DDD 3.1.4
Differential X Protocol Compressor 3.8.0
DirectX
FREECIV 1.8.0
FXDR
GCC 2.95.2
GIMP for Win32
IBM's OpenDX
Icarus Verilog
Insight Debugger, Pine, Wget, Info, Other Ports
Kerberos V4 EBONES Distribution
LAPACK LIBRARIES
Lesstif 0.89.9
LibSTDC - V3 2.90.7
Lynx-2.8.2r1
MC-4.1.36, TCLTK-8.3.1
Octopod for C
Open PTC for Windows
Perl-5.6.0
Perl, GDBM, CVS, And CygiPC
PGPlot 5.2
Python headers for mingw
repgl
RPM 3.04, Lynx 2.8.3
RXVT
Screen-3.9.8, XChat-1.6.0
Screen Saver Library
TCL / TK 8.1
UCD SNMP
X11R6.4 Archive and ZyAcc
XChat-text 1.5.7