查看当前系统可用的shell
1 | cat /etc/shells |
查看当前用户使用的shell
1 | echo $SHELL |
切换当前用户使用的shell
1 | chsh -s /bin/zsh |
安装zsh
Redhat Linux
1 | sudo yum install zsh |
Ubuntu Linux
1 | sudo apt-get install zsh |
安装oh my zsh
确保你已经安装了git。sudo apt-get install git
然后执行以下命令即可进行自动安装:
1 | wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh |
配置
1 | vim ~/.zshrc |
部分配置如下
1 | alias cls='clear' |
插件
autojump
下载autojump源码
1 | git clone git://github.com/joelthelion/autojump.git |
安装
1 | cd autojump |
将以下代码加入.zshrc
1 | [[ -s /home/pi/.autojump/etc/profile.d/autojump.sh ]] && source /home/pi/.autojump/etc/profile.d/autojump.sh |
执行source ~/.zshrc使配置生效