使用Cygwin在Windows上體驗Linux的快感
阿新 • • 發佈:2017-06-06
windows 定義網絡 cut pri efi 程序 dynamic locale markdown
前言
記得大學的時候就以前使用過Cygwin,可惜當時沒有發現她的美,我相信如今大多數朋友可能會更加傾向於使用Git
或者幹脆直接使用虛擬機以及原生Unix。
只是對於剛進入Linux的世界新人來說,使用Cygwin能夠讓你在Windows以下練習Linux的Bash,以及經常使用工具,而不須要安裝Linux,也不用操心Windows被破壞。給每一個人多一種選擇也蠻好的,最後再一次感謝163為開源做出的努力。
Get that Linux feeling - on Windows
更新歷史
2015年07月21日 - 初稿
閱讀原文 - http://wsgzao.github.io/post/cygwin/
擴展閱讀
Cygwin - http://www.cygwin.com/
163源 - http://mirrors.163.com/cygwin/
依照個人習慣一步步勾選就可以,軟件源我選擇163,假設網絡不給力能夠下載我提供的完整離線包
在線安裝
- 點擊下一步
- 選擇
Install from Internet
- 自己定義安裝路徑
- 自己定義Local Package Directory
- 自己定義網絡連接下載方式(能夠使用代理加速)
- 選擇
http://mirrors.163.com
作為下載源 - 選擇自己所需的Packages
離線安裝
- 點擊下一步
- 選擇
Install from Local Directory
- 自己定義安裝路徑
- 定義Local Package Directory為
mirrors.163.com
- 選擇自己所需的Packages
軟件庫
你相同能夠在Cygwin上編譯安裝和運行Unix下的程序
在Select Packages
界面搜索並勾選所需的包或者直接所有install Devel
,舉個GoAccess
栗子
Administrator@PC-20150629NSFI ~/goaccess-0.9.2
$ ./configure --enable-utf8
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pthread_create in -lpthread... yes
checking build system type... x86_64-unknown-cygwin
checking host system type... x86_64-unknown-cygwin
checking whether to build with rdynamic for GNU ld... no
checking for mvaddwstr in -lncursesw... yes
checking for ncursesw/ncurses.h... yes
checking for ncurses.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB2... yes
checking for g_list_append in -lglib-2.0... yes
checking for socket in -lsocket... no
checking for gethostbyname in -lnsl... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for an ANSI C-conforming const... yes
checking for off_t... yes
checking for size_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for ptrdiff_t... yes
checking for working strtod... yes
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for working memcmp... yes
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for regcomp... yes
checking for strtoull... yes
checking for memmove... yes
checking for floor... yes
checking for gethostbyaddr... yes
checking for gethostbyname... yes
checking for memset... yes
checking for setlocale... yes
checking for strchr... yes
checking for strdup... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for realpath... yes
checking for malloc... yes
checking for realloc... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
Your build configuration:
CFLAGS = -pthread
storage: On-memory Hash Database (GLib)
prefix: /usr/local
package: goaccess
version: 0.9.2
bugs: [email protected]
make && make install
$ goaccess -V
GoAccess - 0.9.2.
For more details visit: http://goaccess.io
Copyright (C) 2009-2015 GNU GPL‘d, by Gerardo Orellana
使用Cygwin在Windows上體驗Linux的快感