Simply put, cygwin is a set of intermediate porting tools developed by GNU developers to port some powerful applications in UNIX systems to Windows. You can also think of it as a powerful Unix simulation tool in windows. What is cygwin? If you are a developer, it is a development tool. If you want to learn and use Unix systems in windows, it is a UNIX user tool set.
Simply put, cygwin is a set of intermediate porting tools developed by GNU developers to port some powerful applications in UNIX systems to Windows. You can also think of it as a powerful Unix simulation tool in windows. What is cygwin? If you are a developer, it is a development tool. If you want to learn and use Unix systems in windows, it is a UNIX user tool set.
Functions of cygwin
For developers, cygwin provides developers with a 32-bit application development tool. First, cygwin can be considered as a set of tools, which are transplanted from the GNU development tools widely used by developers and can be run on Windows 9x/NT. With the cygwin tool set, developers can directly use Unix system functions to call and some running environments required by the program.
Programmers can directly call the standard Microsoft WIN32API in windows, and can also use the cygwin API to compile Win32 console applications and GUI applications. Using cygwin can easily port some important UNIX applications to Win32 environments. The source code of these applications can be run in windows without major changes.
Users familiar with windows can understand cygwin as dynamic-linked library (DLL), which provides a large number of UNIX system calls. Currently, the latest release includes all posix.1/90 calls except setuid and mkfifo, all ansi c standard calls, and many common BSD and svr4 services, such: berkeley sockets.
For common users, cygwin provides a set of UNIX tools to run it to convert your windows system into a unix host. This set of tools includes bash shell. You can use these tools in a simulated Unix environment, or directly use them in Windows doscommand line environment without entering the Unix virtual machine environment.
What software packages does cygwin contain?
1. development Kit: binutils, Bison, byacc, dejagnu, diff, CT, 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, and time;
3. source program packages of each software package.
All the above programs are available for free.
Cygwin is a full-featured Win32 application. It is a porting layer of UNIX applications and is fully compatible with Win32 (including Windows 95/98/NT currently in use ). This project was launched in 1995 to port GNU development tools to Win32 systems.
Download and install
Download this program (http://sources.redhat.com/cygwin/setup.exe) and then run it, it will automatically install the latest cygwin.
If your computer has been connected to the Internet, you can choose to install it from the Internet (figure 1). The installer will automatically find the site where the cygwin software package is placed and list dozens of sites, you can select the most recent site from the site, and confirm the installation procedures
Download the package in one step. After the download is complete, the installation starts automatically. The installation process is fully automated. You only need to enter the installation path as required. The entire installation process takes about 5 minutes, depending on the machine performance. After the installation is complete, a batch file is automatically generated, and an icon is also generated on the desktop. Click it to start running.
Use cygwin
After the program is installed, a batch file cygwin. bat is generated under the corresponding installation directory. You can run the program directly or on the desktop.
After the program runs, it directly enters a virtual unix host, which is a complete
The directory structure is exactly the same as that of a Common Unix system and includes basic Unix commands. These commands can be run on this virtual unix host. This is not surprising, but it is surprising that these commands can also be run directly in the Windows command line environment.
Run the following commands on the DOS interface:
C:/> Mount C: // C (Note: mount the hard disk C to A/C directory of the virtual UNIX system (the name can be another one)
C:/> Mount D: // D (Note: D of the hard disk is mounted to a directory/d of the virtual unix machine)
C:/> Mount E: // CDROM (Note: mount the E disk to the/CDROM directory of the virtual unix machine)
The function is equivalent to the following Unix commands:
$ Mount/dev/hdax/C # X indicates a partition with values of 1, 2, and 3 ......
Use conventional Unix Commands (note that this is used directly in a conventional Windows command line environment): PS (process view), as shown in 2.
Compile a small C language program, compile it using gcc, and run result 3 (in Windows command line mode ).
All of the preceding commands use Unix commands in a Windows environment. Of course, you can use these commands on a virtual unix machine. It can be seen that there is almost no difference between the GCC compiler and the Unix compiler.
Cygwin also provides compilation for itself. If you want to compile your own cygwin, you can choose to install the source code package during installation. In this way, if you want to compile cygwin, you can enter the cygwin-1.1.6-1 directory, run configure, make to complete the compilation of cygwin (figure 4 ).
About the use of cygwin, the following URL has a detailed guide: http://cygwin.com/cygwin-ug-net/
Cygwin-ug-net.html.
Xfree for cygwin
X Window is a GUI in a Unix environment. Almost all UNIX versions can run X applications. Can this mini UNIX made up of cygwin run X applications?
Surprisingly, the xfree application can run under cygwin!
If you are interested, you can go to the following sites to find and download xfree for cygwin. It is an X Window System running in a Windows environment and a free software. You can see from the introduction of the website that it is developed by a person.
Product. Currently, freex86 4.0 is used. With it, users who require installation of X Window in Windows do not have to spend money to purchase commercial X Window servers in windows. It can run well. The window manager is the simplest TWM.
I downloaded the xfree for cygwin software package and successfully installed it in NT. The running effect is good. Note that the latest xfree for cygwin is 4.0.1 during installation. Do not forget to download an xwin-Update Software Package and install it. Otherwise, you may not be able to run X Window.
The software packages to be downloaded and installed include:
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's the file)
You can download all the files in the xc-4-binaries directory and install them all.
Installation Method:
Copy all the bz2 files to the cygwin installation directory and run cygwin. BAT to enter the Unix environment.
Step 1: extract:
$ Bunzip2-D *. bz2
Step 2:
$ Tar-xvf xfree86-4.0.Xwin.tar
$ Tar-xvf xfree86-4.0.DLL.tar
...
In this way, tar automatically places the files in the package in the correct position without running the installer. After decompression, the installation is complete.
How to run X Window?
$ CD/usr/x11r6/bin
$./Startxwin. bat
You can start X Window.
For more information, see http://cygwin.com/xfree /.
List of transplanted applications
Apache 1.3.9 php-4.0b2
Arpc
Camp 1.2b1
CD recording software
Cygwin b20.1 released!
Data ploadlibrary 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
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
RPMS 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