第一次启动时会生成Home目录,在${cygwin}/home/${YOUR_USER_NAME}。${cygwin}表示你的cygwin安装目录。html
调整${HOME}/.bashrc文件,把注释掉别名打开:
```sh
alias df='df -h'
alias du='du -h'python
alias whence='type -a' # where, of a sort
alias grep='grep --color' # show differences in colour
alias egrep='egrep --color=auto' # show differences in colour
alias fgrep='fgrep --color=auto' # show differences in colourgit
alias ls='ls -h --color=tty' # classify files in colour
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
alias ll='ls -l' # long list
alias la='ls -A' # all but . and ..
alias l='ls -CF' #
alias wch='which -a'
```
这样调整后,能够ls、grep、dir输出彩色显示。另外加上命令的-h选项,这样文件大小以K、M、G显示,方便人阅读。vim
git输出(好比log、status)彩色显示,使用下面的命令配置:
sh git config --global color.ui auto
bash
vi配置
在${HOME}/.vimrc文件中加上: # 没有.vimrc文件就新建。
```sh
set number
set hlsearch
set fileencoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1ui
set nocompatible
set backspace=indent,eol,start编码
配置盘符的连接
到D盘,要/cygdrive/d,能够新建符号连接/d,这样能够减小录入(MSYS的作法)
sh ln -s /cygdrive/c /c ln -s /cygdrive/d /d ln -s /cygdrive/e /e
spa
sh shopt -s nocaseglob
sh set completion-ignore-case on
sh # Ctrl+Left/Right to move by whole words "\e[1;5C": forward-word "\e[1;5D": backward-word # Ctrl+Backspace/Delete to delete whole words "\e[3;5~": kill-word "\C-_": backward-kill-word
sh export LC_ALL=zh_CN.GBK export LC_CTYPE=zh_CN.GBK export LANG=zh_CN.GBK export XMODIFIERS=@im=Chinput3 stty cs8 -istrip stty pass8 export LESSCHARSET=latin1
sh set meta-flag on set convert-meta off set input-meta on set output-meta on
sh alias ls='ls --color --show-control-chars'