windows下运行linux命令行环境配置

在windows下配置linux命令行的运行环境

介绍一个工具 Chocolatey The package manager for Windows

安装 git for windows

Download: https://git-scm.com/download/win

chocolatey包含丰富的软件包

命令行配置

$ cat /etc/bash.bashrc

# 避免出现命令乱码的别名使用
alias ping="winpty ping"
alias ipconfig="winpty ipconfig"
alias python="winpty python"
alias aws="winpty aws"
alias java="winpty java"
alias ll="ls -al"

# Aria下载器
alias aria2="/d/soft/aria2/aria2-1.34.0-win-64bit-build1/aria2c.exe"

# 慢查询日志分析命令
alias slow-query="pt-query-digest"

# MarkdownPad 2
alias markdown="/d/soft/'MarkdownPad 2'/MarkdownPad2.exe"
#export JRE_HOME=/c/Program\ Files/Java/jdk1.8.0_162/jre
#export LC_ALL="zh_CN.GBK"
#export LANG="zh_CN.GBK"

# ruby 命令
alias ruby="/d/package/ruby25/bin/ruby.exe"
# gem命令
alias gem="/d/package/rubygems-2.7.7/bin/gem"
alias notepad="/d/soft/Notepad++/notepad++.exe"

alias proxy='export all_proxy=socks5://127.0.0.1:1086'
alias unproxy='unset all_proxy'

alias mysql='/d/package/mysql-5.7.24/bin/mysql.exe'