手机版
你好,游客 登录 注册
背景:
阅读新闻

Cygwin配置指南

[日期:2019-02-22] 来源:Linux社区  作者:Linux [字体: ]

Cygwin配置总结

Cygwin是

  • 大量GNU和开放源码工具的集合,它们提供了类似于Windows上的Linux发行版的功能。

  • DLL(cygwin1.dll),它提供了大量的POSIX API功能。

Cygwin不是

  • 一种在Windows上运行本地Linux应用程序的方法。如果希望应用程序在Windows上运行,则必须从源代码重新构建应用程序。

  • 一种神奇地使本机Windows应用程序知道UNIX∈功能(如信号、ptys等)的方法。同样,如果想利用Cygwin功能,需要从源代码构建应用程序。

安装Cygwin

  • 通过运行setup-x86_64.exe(64位安装)或setup-x86.exe(32位安装)安装Cygwin

  • 使用安装程序执行新安装或更新现有安装。

  • 请记住,发行版中的单个包是与DLL分开更新的,所以Cygwin DLL版本对于一般的Cygwin发行版本号来说没有用。

国内源地址

  • 网易 http://mirrors.163.com/cygwin/

  • 中科大 http://mirrors.ustc.edu.cn/cygwin/
  • 搜狐 http://mirrors.sohu.com/cygwin/

安装过程中选择站点时一定要自己添加国内源,不然下载会很慢,推荐搜狐

安装第三方包管理工具apt-cyg

wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg
mv apt-cyg /bin/apt-cyg
chmod +x /bin/apt-cyg
apt-cyg mirror http://mirrors.sohu.com/cygwin/

apt-cyg用法

install
  Install package(s).

remove
  Remove package(s) from the system.

update
  Download a fresh copy of the master package list (setup.ini) from the
  server defined in setup.rc.

download
  Retrieve package(s) from the server, but do not install/upgrade anything.

show
  Display information on given package(s).

depends
  Produce a dependency tree for a package.

rdepends
  Produce a tree of packages that depend on the named package.

list
  Search each locally-installed package for names that match regexp. If no
  package names are provided in the command line, all installed packages will
  be queried.

listall
  This will search each package in the master package list (setup.ini) for
  names that match regexp.

category
  Display all packages that are members of a named category.

listfiles
  List all files owned by a given package. Multiple packages can be specified
  on the command line.

search
  Search for downloaded packages that own the specified file(s). The path can
  be relative or absolute, and one or more files can be specified.

searchall
  Search cygwin.com to retrieve file information about packages. The provided
  target is considered to be a filename and searchall will return the
  package(s) which contain this file.

安装编译环境

apt-cyg install gcc-core gcc-g++ gdb make autoconf automake libboost-devel

安装系统管理工具

apt-cyg install openssh openssl binutils util-linux bash-completion procps inetutils bind-utils

安装常用工具

apt-cyg install git wget curl vim tree

安装Python

apt-cyg install python python-ipython python-pip python-setuptools
apt-cyg install python3 python3-ipython python3-pip python3-setuptools

#pip配置
mkdir ~/.pip
touch ~/.pip/pip.conf
echo -e "[global]\nindex-url = https://pypi.tuna.tsinghua.edu.cn/simple" > ~/.pip/pip.conf
python -m pip install --upgrade pip
pip install ipython

#语法检查
pip install --user flake8
#自动代码提示
pip install --user jedi
#自动导入模块
pip install --user isort
#代码格式化
pip install --user yapf

安装帮助手册

apt-cyg install help2man man-db man-pages-posix

安装zsh

apt-cyg install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装nodejs

npm config set registry https://registry.npm.taobao.org
npm i -g tldr
tldr --update
npm i -g cnpm --registry=https://registry.npm.taobao.org
npm i -g yarn
yarn config set registry https://registry.npm.taobao.org

Cygwin 3.0.0-1 发布,POSIX兼容环境  https://www.linuxidc.com/Linux/2019-02/156957.htm

Windows下Cygwin安装使用教程  https://www.linuxidc.com/Linux/2019-02/156968.htm

Linux公社的RSS地址https://www.linuxidc.com/rssFeed.aspx

本文永久更新链接地址https://www.linuxidc.com/Linux/2019-02/157027.htm

linux
相关资讯       Cygwin  Cygwin配置 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款