Molet

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

Molet 运维技术 2022-11-20 576浏览 0

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

前言

记得大学的时候就曾经使用过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栗子

      Administrator@PC-20150629NSFI~/goaccess-0.9.2
      $./configure--enable-utf8
      checkingforaBSD-compatibleinstall.../usr/bin/install-c
      checkingwhetherbuildenvironmentissane...yes
      checkingforathread-safemkdir-p.../usr/bin/mkdir-p
      checkingforgawk...gawk
      checkingwhethermakesets$(MAKE)...yes
      checkingforgcc...gcc
      checkingwhethertheCcompilerworks...yes
      checkingforCcompilerdefaultoutputfilename...a.exe
      checkingforsuffixofexecutables....exe
      checkingwhetherwearecrosscompiling...no
      checkingforsuffixofobjectfiles...o
      checkingwhetherweareusingtheGNUCcompiler...yes
      checkingwhethergccaccepts-g...yes
      checkingforgccoptiontoacceptISOC89...noneneeded
      checkingforstyleofincludeusedbymake...GNU
      checkingdependencystyleofgcc...gcc3
      checkingwhethergccandccunderstand-cand-otogether...yes
      checkingforpthread_createin-lpthread...yes
      checkingbuildsystemtype...x86_64-unknown-cygwin
      checkinghostsystemtype...x86_64-unknown-cygwin
      checkingwhethertobuildwithrdynamicforGNUld...no
      checkingformvaddwstrin-lncursesw...yes
      checkingforncursesw/ncurses.h...yes
      checkingforncurses.h...yes
      checkingforpkg-config.../usr/bin/pkg-config
      checkingpkg-configisatleastversion0.9.0...yes
      checkingforpkg-config.../usr/bin/pkg-config
      checkingforGLIB2...yes
      checkingforg_list_appendin-lglib-2.0...yes
      checkingforsocketin-lsocket...no
      checkingforgethostbynamein-lnsl...no
      checkinghowtoruntheCpreprocessor...gcc-E
      checkingforgrepthathandleslonglinesand-e.../usr/bin/grep
      checkingforegrep.../usr/bin/grep-E
      checkingforANSICheaderfiles...yes
      checkingforsys/types.h...yes
      checkingforsys/stat.h...yes
      checkingforstdlib.h...yes
      checkingforstring.h...yes
      checkingformemory.h...yes
      checkingforstrings.h...yes
      checkingforinttypes.h...yes
      checkingforstdint.h...yes
      checkingforunistd.h...yes
      checkingnetinet/in.husability...yes
      checkingnetinet/in.hpresence...yes
      checkingfornetinet/in.h...yes
      checkingsys/socket.husability...yes
      checkingsys/socket.hpresence...yes
      checkingforsys/socket.h...yes
      checkingarpa/inet.husability...yes
      checkingarpa/inet.hpresence...yes
      checkingforarpa/inet.h...yes
      checkinglocale.husability...yes
      checkinglocale.hpresence...yes
      checkingforlocale.h...yes
      checkingnetdb.husability...yes
      checkingnetdb.hpresence...yes
      checkingfornetdb.h...yes
      checkingforstdint.h...(cached)yes
      checkingforstdlib.h...(cached)yes
      checkingforstring.h...(cached)yes
      checkingforunistd.h...(cached)yes
      checkingstddef.husability...yes
      checkingstddef.hpresence...yes
      checkingforstddef.h...yes
      checkingforanANSIC-conformingconst...yes
      checkingforoff_t...yes
      checkingforsize_t...yes
      checkingwhetherstructtmisinsys/time.hortime.h...time.h
      checkingforptrdiff_t...yes
      checkingforworkingstrtod...yes
      checkingfor_LARGEFILE_SOURCEvalueneededforlargefiles...no
      checkingforworkingmemcmp...yes
      checkingwhetherlstatcorrectlyhandlestrailingslash...yes
      checkingwhetherstatacceptsanemptystring...no
      checkingforstrftime...yes
      checkingforregcomp...yes
      checkingforstrtoull...yes
      checkingformemmove...yes
      checkingforfloor...yes
      checkingforgethostbyaddr...yes
      checkingforgethostbyname...yes
      checkingformemset...yes
      checkingforsetlocale...yes
      checkingforstrchr...yes
      checkingforstrdup...yes
      checkingforstrerror...yes
      checkingforstrrchr...yes
      checkingforstrstr...yes
      checkingforstrtol...yes
      checkingforrealpath...yes
      checkingformalloc...yes
      checkingforrealloc...yes
      configure:creating./config.status
      config.status:creatingMakefile
      config.status:creatingsrc/config.h
      config.status:executingdepfilescommands
      
      Yourbuildconfiguration:
      
      CFLAGS=-pthread
      storage:On-memoryHashDatabase(GLib)
      prefix:/usr/local
      package:goaccess
      version:0.9.2
      bugs:goaccess@prosoftcorp.com
      
      
      make&&makeinstall
      
      $goaccess-V
      GoAccess-0.9.2.
      Formoredetailsvisit:http://goaccess.io
      Copyright(C)2009-2015GNUGPL'd,byGerardoOrellana
      

继续浏览有关 Linux 的文章
发表评论