使用Cygwin在Windows上体验Linux的快感

运维 系统运维 Linux
对于刚进入Linux世界的新人来说,使用Cygwin可以让你在Windows下面练习Linux的Bash,以及常用工具,而不需要安装Linux,也不用担心Windows被破坏,给每个人多一种选择也蛮好的。

[[141926]]

前言

记得大学的时候就曾经使用过Cygwin,可惜当时没有发现她的美,我相信现在大多数朋友可能会更加倾向于使用Git或者干脆直接使用虚拟机以及原生Unix。不过对于刚进入Linux世界的新人来说,使用Cygwin可以让你在Windows下面练习Linux的Bash,以及常用工具,而不需要安装Linux,也不用担心Windows被破坏,给每个人多一种选择也蛮好的,***再一次感谢163为开源做出的努力。

更新历史

Cygwin - http://www.cygwin.com/
163源 - http://mirrors.163.com/cygwin/

按照个人习惯一步步勾选即可,软件源我选择163,如果网络不给力可以下载我提供的完整离线包。

在线安装

  1. 点击下一步
  2. 选择Install from Internet
  3. 自定义安装路径
  4. 自定义Local Package Directory
  5. 自定义网络连接下载方式(可以使用代理加速)
  6. 选择http://mirrors.163.com作为下载源
  7. 选择自己所需的Packages

离线安装

  1. 点击下一步
  2. 选择Install from Local Directory
  3. 自定义安装路径
  4. 定义Local Package Directory为mirrors.163.com
  5. 选择自己所需的Packages

软件库

你同样可以在Cygwin上编译安装和执行Unix下的程序

Select Packages界面搜索并勾选所需的包或者直接全部install Devel,举个GoAccess栗子

  1. Administrator@PC-20150629NSFI ~/goaccess-0.9.2 
  2. $ ./configure --enable-utf8 
  3. checking for a BSD-compatible install... /usr/bin/install -c 
  4. checking whether build environment is sane... yes 
  5. checking for a thread-safe mkdir -p... /usr/bin/mkdir -p 
  6. checking for gawk... gawk 
  7. checking whether make sets $(MAKE)... yes 
  8. checking for gcc... gcc 
  9. checking whether the C compiler works... yes 
  10. checking for C compiler default output file name... a.exe 
  11. checking for suffix of executables... .exe 
  12. checking whether we are cross compiling... no 
  13. checking for suffix of object files... o 
  14. checking whether we are using the GNU C compiler... yes 
  15. checking whether gcc accepts -g... yes 
  16. checking for gcc option to accept ISO C89... none needed 
  17. checking for style of include used by make... GNU 
  18. checking dependency style of gcc... gcc3 
  19. checking whether gcc and cc understand -c and -o together... yes 
  20. checking for pthread_create in -lpthread... yes 
  21. checking build system type... x86_64-unknown-cygwin 
  22. checking host system type... x86_64-unknown-cygwin 
  23. checking whether to build with rdynamic for GNU ld... no 
  24. checking for mvaddwstr in -lncursesw... yes 
  25. checking for ncursesw/ncurses.h... yes 
  26. checking for ncurses.h... yes 
  27. checking for pkg-config... /usr/bin/pkg-config 
  28. checking pkg-config is at least version 0.9.0... yes 
  29. checking for pkg-config... /usr/bin/pkg-config 
  30. checking for GLIB2... yes 
  31. checking for g_list_append in -lglib-2.0... yes 
  32. checking for socket in -lsocket... no 
  33. checking for gethostbyname in -lnsl... no 
  34. checking how to run the C preprocessor... gcc -E 
  35. checking for grep that handles long lines and -e... /usr/bin/grep 
  36. checking for egrep... /usr/bin/grep -E 
  37. checking for ANSI C header files... yes 
  38. checking for sys/types.h... yes 
  39. checking for sys/stat.h... yes 
  40. checking for stdlib.h... yes 
  41. checking for string.h... yes 
  42. checking for memory.h... yes 
  43. checking for strings.h... yes 
  44. checking for inttypes.h... yes 
  45. checking for stdint.h... yes 
  46. checking for unistd.h... yes 
  47. checking netinet/in.h usability... yes 
  48. checking netinet/in.h presence... yes 
  49. checking for netinet/in.h... yes 
  50. checking sys/socket.h usability... yes 
  51. checking sys/socket.h presence... yes 
  52. checking for sys/socket.h... yes 
  53. checking arpa/inet.h usability... yes 
  54. checking arpa/inet.h presence... yes 
  55. checking for arpa/inet.h... yes 
  56. checking locale.h usability... yes 
  57. checking locale.h presence... yes 
  58. checking for locale.h... yes 
  59. checking netdb.h usability... yes 
  60. checking netdb.h presence... yes 
  61. checking for netdb.h... yes 
  62. checking for stdint.h... (cached) yes 
  63. checking for stdlib.h... (cached) yes 
  64. checking for string.h... (cached) yes 
  65. checking for unistd.h... (cached) yes 
  66. checking stddef.h usability... yes 
  67. checking stddef.h presence... yes 
  68. checking for stddef.h... yes 
  69. checking for an ANSI C-conforming const... yes 
  70. checking for off_t... yes 
  71. checking for size_t... yes 
  72. checking whether struct tm is in sys/time.h or time.h... time.h 
  73. checking for ptrdiff_t... yes 
  74. checking for working strtod... yes 
  75. checking for _LARGEFILE_SOURCE value needed for large files... no 
  76. checking for working memcmp... yes 
  77. checking whether lstat correctly handles trailing slash... yes 
  78. checking whether stat accepts an empty string... no 
  79. checking for strftime... yes 
  80. checking for regcomp... yes 
  81. checking for strtoull... yes 
  82. checking for memmove... yes 
  83. checking for floor... yes 
  84. checking for gethostbyaddr... yes 
  85. checking for gethostbyname... yes 
  86. checking for memset... yes 
  87. checking for setlocale... yes 
  88. checking for strchr... yes 
  89. checking for strdup... yes 
  90. checking for strerror... yes 
  91. checking for strrchr... yes 
  92. checking for strstr... yes 
  93. checking for strtol... yes 
  94. checking for realpath... yes 
  95. checking for malloc... yes 
  96. checking for realloc... yes 
  97. configure: creating ./config.status 
  98. config.status: creating Makefile 
  99. config.status: creating src/config.h 
  100. config.status: executing depfiles commands 
  101.  
  102. Your build configuration: 
  103.  
  104.   CFLAGS = -pthread 
  105.   storage: On-memory Hash Database (GLib) 
  106.   prefix: /usr/local 
  107.   package: goaccess 
  108.   version: 0.9.2 
  109.   bugs: goaccess@prosoftcorp.com 
  110.  
  111.  
  112. make && make install 
  113.  
  114. $ goaccess -V 
  115. GoAccess - 0.9.2. 
  116. For more details visit: http://goaccess.io 
  117. Copyright (C) 2009-2015 GNU GPL'd, by Gerardo Orellana 
责任编辑:火凤凰 来源: HelloDog博客
相关推荐

2018-03-28 09:08:39

微软开源Windows

2014-07-22 15:33:02

Ubuntu

2023-08-21 14:18:58

ReactWindows系统

2009-01-06 10:04:44

CygwinGCCGUI

2009-08-14 09:35:31

Windows 7云计算LiveMesh

2012-11-23 14:33:06

IBMdW

2015-12-01 16:39:04

工业4.0华为

2015-01-15 10:50:46

CoreOSUnitedStackDocker

2018-09-10 13:55:19

2017-08-01 09:19:47

小米MIUIMIUI9

2018-09-04 23:28:06

2009-12-04 15:49:14

无线路由器加速

2010-03-24 11:14:41

TurboLinux系

2009-04-28 18:59:56

LinuxWindows体验

2010-03-31 10:50:17

Ubuntu操作系统

2021-09-18 09:14:54

LinuxWindowsWindows 11

2013-05-14 10:13:06

WindowsLinux操作系统

2012-09-28 09:20:41

WPS for Lin

2021-10-09 11:14:29

英伟达DLSS驱动程序

2013-05-06 13:52:46

WindowsRedis
点赞
收藏

51CTO技术栈公众号