Windows 搭建 Linux开发环境 cygwin

主页:
Cygwin
https://cygwin.com/
下载主页:
Cygwin Installation
https://cygwin.com/install.html
下载地址:
setup-x86.exe
https://cygwin.com/setup-x86.exe
这似乎是个悖论,虽然有国内的镜像网站可以安装,但是又不提供安装程序文件setup-x86.exe,这个都下载不下来,要这个镜像何用……

Windows 搭建 Linux开发环境 cygwin

重新下了一次,十几k的速度下载下来了

Windows 搭建 Linux开发环境 cygwin

从互联网安装(后面设置使用网易的镜像)

Windows 搭建 Linux开发环境 cygwin

安装地址

Windows 搭建 Linux开发环境 cygwin

安装文件存放地址(离线安装可用)

Windows 搭建 Linux开发环境 cygwin

输入镜像地址,点击Add

Windows 搭建 Linux开发环境 cygwin

Windows 搭建 Linux开发环境 cygwin

Windows 搭建 Linux开发环境 cygwin

Windows 搭建 Linux开发环境 cygwin

Windows 搭建 Linux开发环境 cygwin

Windows 搭建 Linux开发环境 cygwin

 

 

桌面默认的打开的终端是mintty
C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -

Windows 搭建 Linux开发环境 cygwin

默认的是cmd(支持bash命令,例如ls而不是dir),在C:\cygwin\Cygwin.bat

Windows 搭建 Linux开发环境 cygwin

 

 

自定义显示
To set up bash so that cut and paste work properly, click on the "Properties" button of the window, then on the "Misc" tab. Make
sure that "QuickEdit mode" and "Insert mode" are checked. These settings will be remembered next time you run bash from that
shortcut.

Windows 搭建 Linux开发环境 cygwin Windows 搭建 Linux开发环境 cygwin

Your home directory should contain three initialization files that control the behavior of bash. They are .profile, .bashrc
and .inputrc. The Cygwin base installation creates stub files when you start bash for the first time.

Windows 搭建 Linux开发环境 cygwin

 

 

自定义输入完成大小写不敏感
inputrc controls how programs using the readline library (including bash) behave. It is loaded automatically. For full details
see the Function and Variable Index section of the GNU readline manual. Consider the following settings:
# Ignore case while completing
set completion-ignore-case on
# Make Bash 8bit clean
set meta-flag on
set convert-meta off
set output-meta on
The first command makes filename completion case insensitive, which can be convenient in a Windows environment. The next
three commands allow bash to display 8-bit characters, useful for languages with accented characters. 

 


cygwin不自带gcc?
默认是不安装的,category模式勾选Devel安装

Windows 搭建 Linux开发环境 cygwin