博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Cmder + Babun 打造 Windows 好用的终端工具
阅读量:7227 次
发布时间:2019-06-29

本文共 2403 字,大约阅读时间需要 8 分钟。

Babun

a windows shell you will love

6d9475f6ly1fy1zei8us0j20m2079dhg.jpg

Babun features the following:

  • Pre-configured Cygwin with a lot of addons
  • Silent command-line installer, no admin rights required
  • pact - advanced package manager (like apt-get or yum)
  • xTerm-256 compatible console
  • HTTP(s) proxying support
  • Plugin-oriented architecture
  • Pre-configured git and shell
  • Integrated oh-my-zsh
  • Auto update feature
  • "Open Babun Here" context menu entry

Babun 安装方式:

  • 下载;
  • 下载完成后,解压软件包,找到:install.bat 双击,安装开始,安装完成后,会在桌面创建一个babun的快捷方式。

安装完成后,可以考虑换一下cygwin的源:

cd ~vim .pact/pact.repoPATC_REPO=http://mirrors.163.com/cygwin

Babun 用法

{ d }  » babun -h                                                                      /cygdrive/dbabun: Manages the instance of babun.Usage:  "babun update" to fetch the newest version of babun  "babun check" to check if the installation is correct  "babun shell" to display the name of the user's default shell (may not be the currently used shell)  "babun shell 
" to set the user's default shell to new_shell "babun install" to (re)install babun to the current user's home folder "babun login" to login to the user's default shell "babun
cmd" to execute cmd provided by the given pluginOptions: --help --version --welcome

Babun Python配置

因为Babun默认的Python是python2,于是先删除了连接再根据我系统中Python所在文件夹创建了python的链接

cd /usr/binrm -rf python ln -s /cygdrive/c/ProgramData/Anaconda3/python.exe /usr/bin/pythonpython -i #在Babun中,需要加上-i参数,才能正常启动python

6d9475f6ly1fy1zeze34oj20m8027tau.jpg

cmder

cmder 安装方式

  • Unzip
  • (optional) Place your own executable files into the bin folder to be injected into your PATH.
  • Run Cmder (Cmder.exe)

cmder配置

1.添加 cmder 到右键菜单,管理员权限打开自带cmd,运行如下命令:

Cmder.exe /REGISTER ALL

此外,启动设置

去除 *cmd /k ""%ConEmuDir%\..\init.bat" "改为:cmd /k “%ConEmuDir%..\init.bat” -new_console:d:%CD%

2.中文显示

settings->Startup->Environmen

set LANG=zh_CN.UTF-8

3.alias设置

cmder文件夹->config->user-aliases.cmd

ll=ls --show-control-chars -aF --color $*

4.设置分屏的快捷键

我将分屏快捷键设置为了 ctrl+shift+→

将Babun整合到ConEmu/cmder

再把babun添加到cmder的tab选项中,

  • Startup>Tasks面板点+号添加一个task,名称输入babun,
  • Task parameters填入/icon "%userprofile%\.babun\cygwin\bin\mintty.exe" /dir "%userprofile%"
  • Commands填入%userprofile%\.babun\cygwin\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/zsh.exe

保存后,就可以在cmder新建一个babun的窗口,默认的shell是zsh,搭配好了oh-my-zsh的配置

用Babun的好处是,几乎linux的命令都可以直接使用,比如rsync

ssh登录linux机器

ssh 用户名@ipexit #退出ssh登录

参考

转载于:https://www.cnblogs.com/michael-xiang/p/10466074.html

你可能感兴趣的文章
piwik 案例介绍
查看>>
敏感字过滤
查看>>
为什么我们要从 NodeJS 迁移到 Ruby on Rails
查看>>
Android 文件式数据库Realm
查看>>
Linux 面试知识点笔记
查看>>
论flex布局和box布局的华为meta8手机自带浏览器的兼容
查看>>
dubbo与springcloud初识
查看>>
iis web.config 配置示例
查看>>
归并排序
查看>>
java 的转义字符
查看>>
SharedPreferences的使用注意事项
查看>>
sofa-pbrpc高级用法
查看>>
Oracle 函数返回表实例2种写法实例
查看>>
mysql数据库主从复制
查看>>
Shell标准输出、标准错误 >/dev/null 2>&1
查看>>
Android自定义对话框(Dialog)位置,大小
查看>>
设置python的默认编码为utf8
查看>>
简易sqlhelper-java
查看>>
通过案例对SparkStreaming 透彻理解三板斧之一:解密SparkStreaming运行机制
查看>>
HBuilder 学习笔记
查看>>