Cygwin official website to download the installation package: https: //cygwin.com/install.html
There are three installation modes:
Install from Internet, this model is installed directly from the Internet, for faster speeds situation;
the Download Without Installing, this model only download Cygwin package components from the Internet, but not installed;
the Install from Local Directory, this pattern above the second mode corresponds to when you Cygwin package has been downloaded to the local components, may be installed with this mode from the local Cygwin.
Install all the way down ...
If the installation path is: C: \ cygwin64
Then the Path environment variable followed by the C: \ cygwin64 \ bin
Well, I have done, nothing else
That too simple? I should add that next, Cygwin official website to download the installation package can not be called down, called the boot program is appropriate. Good English can see on this page Q & A, you know Cygwin command you need is to install via setup.exe, and Cygwin itself is not required to run. So, after you install Cygwin Do not delete the setup.exe, later found missing command you can search through setup.exe & supplements.
cygwin installation of setup-x86_64.exe mounter mirror source 163 may be selected (NetEase) address, so that download is faster than from foreign sources, a previously installed cygwin ,, know how selection package, all mounted, occupies results 5 G. Now cywin default is minimal install, but does not include Gcc, if you want to use gcc, g ++, make, gdb tool, is the need to select the gcc-core of these packages, gcc-g ++, make, gdb, binutils, five packages in all Devel under Category.
Windows
And the cygwin
path of conversion
Pwd print current working directory, find the directory under the output directory is not windows, but / home / username, as in the experience under ubuntu, but in the end refers to the directory that windows do? C: \ cygwin64 \ home \ hcf, to be a directory, the root directory of cygwin environment / corresponds to C: \ cygwin64, with cd and ls can see cd / open the C: \ cygwin64, ls showing all the cygwin directory files . / Cygdrive / is the C, D, E in the disk file, such as the use cd / cygdrive / c c to actually enter the disc.
cd 'C: \ Users \ hcf \ Desktop \ tass-sgi-stl-2.91.57-source' single quotes may enter the directory, no less single quotes, \ is in bash escape character, the path represented with n Cygwin \.
gcc –version,g++ --version,make –version,gdb –version, python
Cygwin is a simulation of the Linux operating system on a Windows operating system, Linux is a simulation environment running on the Windows platform, which uses dynamic link libraries * .dll be implemented, in simple terms Cywin is a Windows software.
Cygwin initially gcc, gdb, gas and other development tools were improved to make it possible to generate and interpret win32 object file, then these tools ported to the Windows platform, one solution is based on the win32 api source code tool substantial changes, apparently it takes a lot of work. They took a different way, writing a shared library that is cygwin dll, will not UNIX-style win32 api call in as fork, spawn, signal, select, sockets` ... package into it. In other words, Cywin emulation layer is based on a UNIX system libraries written in win32 api. As long as the source code and the shared library these tools are connected, you can use cross-compiler on UNIX to generate a set of tools that run on the Windows platform. With these tools ported to the Windows platform based, Cygnus and gradually to other tools ported to the Windows platform, and development tools such Bash run on the Windows platform, work on UNIX and feel the same.
Download and install Cygwin
- Official website address http://www.cygwin.com/
- China Mirror https://mirrors.tuna.tsinghua.edu.cn/cygwin/
Cygwin installation is to choose the necessary installation package includes gcc, wget, tar, gawk, bzip2 ..., re-use if not installed cygwin.exe reinstall the program.
Configuring Cygwin environment variable
Executable Cygwin path in the root directory comprises: \ bin, \ sbin, \ usr \ local \ bin, the configuration of the physical path to the directory path in the environment variable.
Environment variable configuration
$ make -v
GNU Make 3.82.90
Built for i686-pc-mingw32
Copyright (C) 1988-2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ gcc -v
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
$ php -v
Install wget
Download wget-latest.tar.gz and move to the home directory, after entering the decompression software to compile and install wget directory.
$ cd wget
$ ./configure
$ make
Install apt-cyg package management tools
$ wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
$ chmod +x apt-cyg
$ mv apt-cyg /usr/local/bin/
$ opt-cyg install nano
Cygwin command
$ ps
$ Ps -aW
$ df
$ vim ~/.bashrc
export LANG="zh_CN.GBK"
export OUTPUT_CHARSET="GBK"
apt-cyg Tool Command
$ apt-cyg install <package names>
$ apt-cyg remove <package names>
$ apt-cyg update
$ apt-cyg list [pattern(s)]
$ apt-cyg show <pattern(s)>
$ apt-cyg search <commands or files>