我安装了 Cygwin 来在 Windows 8 上获取 bash shell,但无法使用vim
、ssh
、apt
、install
命令。许多命令现在可以正常工作,而几分钟前还不起作用。我该怎么做才能使用 Cygwin 获得这些新命令?
编辑 :
我现在知道我必须apt-cyg
使用这个来安装网站这正是我所做的,但即使“apt-cyg 文件”在目录中Downloads
,我仍然不知道如何使用此文件使其工作。
答案1
默认情况下,cygwin 安装程序仅安装类别中的软件包Base
。如果您需要安装其他软件包,则需要选择它们。
https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages
要搜索哪个包包含您要查找的内容,您可以使用网络搜索
https://cygwin.com/cgi-bin2/package-grep.cgi
或命令行
cygcheck -p "file_name"
答案2
我还是不知道如何使用这个文件来让它工作。
请阅读apt-cyg
自述文件,它会告诉您需要知道的一切:
apt-cyg
apt-cyg
是一个 Cygwin 包管理器。它包含一个 Cygwin 的命令行安装程序,该安装程序与 Cygwin Setup 配合使用并使用相同的存储库。github.com/transcode-open/apt-cyg
Operations 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 是一个简单的脚本。要安装:
lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg install apt-cyg /bin
apt-cyg 的使用示例:
apt-cyg install nano
来源自述文件