2014年04月03日 15:23:22

Cygwin Windows下的Linux工具

作者: 

Windows下的Linux命令工具,超级牛逼!

安装cygwin

http://cygwin.com下载相应位数(32bit/64bit)的软件

安装wget

重新启动setup.exe,搜索wget,然后安装相关的

安装apt-cyg命令

  1. wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg -P /bin
  2. chmod.exe +x /bin/apt-cyg

切换源

apt-cyg -m http://mirrors.163.com/cygwin/

使用apt-cyg

apt-cyg install vim
类似ubuntu的apt-get
等价于:使用setup.exe文件,搜索安装命令包vim

其他常用命令(whereis)

apt-cyg install util-linux

clear命令

apt-cyg install ncurses

make

apt-cyg install make

gcc

setup.exe 搜索gcc,全部安装

安装webbench

wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
参考:http://blog.sina.com.cn/s/blog_6b9954cb0101allj.html

ssh/ssh-keygen

setup.exe ssh

top

apt-cyg install procps

crontab

apt-cyg install cron

安装 cron 服务

cygrunsrv -I cron -p /usr/sbin/cron --args -n -u Administrator

启动服务: 也可以用 windows 的启动方式 net start cron

cygrunsrv -S cron

停止服务

cygrunsrv -E cron

cron没有被使用会自动关闭(cygrunsrv: Error starting a service: QueryServiceStatus: Win32 error 1062:)

启动 cygserver(这个好像不是必需的)

cygrunsrv -I cygserver -p /usr/sbin/cygserver -e "CYGWIN=server"

crontab 语法

#sync my gdrive each 10th minute
*/10 * * * * /home/Yordan/sync_gdrive.sh

# * * * * * command to be executed
# - - - - -
# | | | | |
# | | | | +- - - - day of week (0 - 6) (Sunday=0)
# | | | +- - - - - month (1 - 12)
# | | +- - - - - - day of month (1 - 31)
# | +- - - - - - - hour (0 - 23)
# +--------------- minute

cygwin快捷方式启动

E:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -

参考文档



未经同意禁止转载!
转载请附带本文原文地址:Cygwin Windows下的Linux工具,首发自 Zjmainstay学习笔记
阅读( 7078 )
看完顺手点个赞呗:
(1 Vote)

1.PHP cURL群:PHP cURL高级技术
2.正则表达式群:专精正则表达式
3. QQ联系(加请说明):QQ联系博主(951086941)
4. 邮箱:zjmainstay@163.com
5. 打赏博主:

网站总访问量: