Command-line tools under Windows Babun

Source: Internet
Author: User

What is Babun

Babun is a third-party shell on Windows, where you can use almost any of the Linux,unix commands above, and he can almost replace the shell of Windows. With the official title that's a Windows shell you'll love!

Several features of the

Babun

Use Babun without Administrator privileges
Advanced installation Package Manager (similar to Linux above Apt-get or yum)
Pre-configured Cygwin and many plugins
256-Color compatible console
HTTP (S) proxy support
Plugin-oriented architecture
You can use it to configure your git
Integrated oh-my-zsh
Auto-upgrade
Support shell programming, built-in vim, etc.

The core of the Cygwin

Babun includes a preconfigured Cygwin. Cygwin is a very good tool, but there are a lot of use tips that enable you to save a lot of time. Babun solves a lot of problems, it contains a lot of important software packages, is that you can use them the first time.

Package Management:
Babun package Management in Shell input: Pact, this is similar to: Apt-get or yum, to very convenient management package, installation, upgrade, search and delete, let you province a lot of trouble, shell input pact- Help is available for information. The shell of the

Shell

Babun has been tuned to achieve the best user experience, Babun has two shells to be used immediately after the configuration (zsh is used by default), and the Babun Shell has the following features

Syntax highlighting
Tools with UNIX
Software development tool
git-Semantic hints
Custom scripts and aliases
etc...

Console

The

Babun supports HTTP proxies by simply adding the address and credentials of the HTTP proxy server. The BABUNRC file is in the same folder as the source BABUNRC enable HTTP proxy. Socks agents are not currently supported. The

Developer tools

Babun offers a variety of handy tools and scripts that are easier to develop, with features like

Programming language (Python,perl, etc)
Git (various alias adjustments)
UNIX Tools (grep, wget, curl, etc)
VCs (svn, git)
oh-my-zsh
Custom Scripts (pbcopy, Pbpaste, Babun, etc)

Babun website Link: http://babun.github.io/

What is Cmder

Cmder is a multi-label command line tool under window, can be easily new cmd, cmd admin, PowerShell, PowerShell admin multiple command line, set a lot, powerful.

Installing Cmder Installation

Download: http://cmder.net/

Cmder is out-of-the-box software is not detailed, specific use can refer to the official website description.

Babun Installation

Download: http://babun.github.io/

Default installation

After the download is complete, unzip the Babun and double-click the Install.bat script in the directory (requires administrator privileges) to install. After a few minutes the automatic installation is complete and the default will be installed in the %userprofile%\.babun directory.

Customizing the installation location

Specify the directory to install by using the cmd command line when executing install.bat. T or/target.

Perform:babun.bat /t c:\babun

After installation, a. Babun directory will be generated in the C:\babun directory, Babun All files are in this directory. Note The installation directory is best not to have spaces, which is required by Cygwin.

Test installation Succeeded

After the installation is complete, the following two commands are generally required to check

babun check(用于判断环境是否正确)babun update(用于判断是否有新的更新包)
Babun Configuration

Default root directory

%userprofile%\.babun\cygwin\home\Mike
Windows cmd built-in command displays in Chinese

Babun The default encoding is UTF-8, and the cmd command output of Windows is GBK encoded, so when running Windows commands such as ipconfig in Babun, Chinese will be a lot of garbled characters.


Solution: In the Babun of the shell (Mintty) right-hand corner of the Options-text, the character set select Default or GBK, and then execute ipconfig and other cmd built-in command when the normal display of Chinese.

If the Babun code is changed to GBK, the command of the Chinese output is normal, PS1 will appear a garbled character.



Remove command Prompt garbled

Babun built-in two shell, the default is Zsh, the other is bash, set to Chinese after the command prompt will eventually have a garbled character, looking very uncomfortable, to modify the PS1 variable removed. Replace garbled characters with:>>

Bash

vi /usr/local/etc/babun.bashPS1="\[\033[00;34m\]{ \[\033[01;34m\]\W \[\033[00;34m\]}\[\033[01;32m\] \$( git rev-parse --abbrev-ref HEAD 2> /dev/null || echo "" ) \[\033[01;31m\]>>\[\033[00m\]"

Zsh

vi ~/.oh-my-zsh/custom/babun.zsh-themePROMPT=‘%{$fg[blue]%}{ %c } %{$fg[green]%}$(  git rev-parse --abbrev-ref HEAD 2> /dev/null || echo ""  )%{$reset_color%} %{$fg[red]%}%(!.#.>>)%{$reset_color%} ‘

When this is changed, the command prompt becomes:{ ~ } >>

Note: After modifying the code to GBK, the LS command Chinese file name will appear garbled. It is best to use UTF-8 encoding in the Babun environment, and Windows directives such as Ipconfig can be executed with Cmder or the default cmd.

Integrate Babun into Conemu/cmder

In the upper right corner of the Cmder window, right-settings>startup>tasks, add a new task with the DOT + sign named Babun.

Fill in the task parameters

/icon "%userprofile%\.babun\cygwin\bin\mintty.exe" /dir "%userprofile%"

Any of the following can be filled in commands

#默认使用ZSH%userprofile%\.babun\cygwin\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/zsh.exe#使用自定义mintty配置%userprofile%\.babun\cygwin\bin\mintty.exe -t "%userprofile%\.babun\cygwin\etc\minttyrc"

Once saved, the Babun is available when a new terminal is established.

Configure a personalized Mintty
vim ~/.minttyrcCursorType=blockTerm=xterm-256colorFont=Source Code Pro SemiboldFontHeight=10
Development environment Configuration

Pip

Babun has built-in Python, Perl and other interpreters. Cygwin python does not have a PIP and needs to be installed manually.

Just execute the following command directly.

wget https://bootstrap.pypa.io/get-pip.py -O - | python

With Pip, you can freely install things like Ipython, as well as all-encompassing class libraries.

Common plugins

Babun is installed by default Oh My zsh, where you can install some plugins according to their own circumstances. Refer to using OH-MY-ZSH to build your super terminal article

Package Manager uses

Babun provides a package management tool called Pact Package management tool, similar to Linux above for Apt-get or Yum.

Pact using syntax

pact: Installs and removes Cygwin packages.Usage:  "pact install " to install given packages  "pact remove " to remove given packages  "pact update " to update given packages  "pact show" to show installed packages  "pact find " to find packages matching patterns  "pact describe " to describe packages matching patterns  "pact packageof " to locate parent packages  "pact invalidate" to invalidate pact caches (setup.ini, etc.)Options:  --mirror, -m  : set mirror  --invalidate, -i       : invalidates pact caches (setup.ini, etc.)  --force, -f : force the execution  --help  --version

Pact use is relatively simple, not in detail!

Common Software Installation

#安装tmuxpact install tmux        #安装screenpact install screen#安装zippact install zip#安装svnpact install subversion#安装lftp命令pact install lftp#安装p7zip命令pact install p7zip#基于openssh的socks https代理pact install connect-proxy#安装linux基础命令行工具more/col/whereis等命令pact install util-linux    #安装dig命令pact install bind-utils#安装Telnet等常用网络命令pact install inetutils  #安装python环境pact install python        pact install python-crypto

This package management is very convenient, usage is simple, according to their own needs to install it!

Command-line tools under Windows Babun

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.