- 安装zsh、git和wget:
sudo apt-get install zsh git wget
- 获取并自动按照oh-my-zsh:
jiang@Linux:~$ wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
- 替换bash为zsh:
chsh -s /bin/zsh 或者 sudo usermod -s /bin/zsh username
- 修改zsh配置文件
sudo vim ~/.zshrc
- 做如下改动:
-
#将 export PATH=$HOME/bin:/usr/local/bin:$PATH #修改为: export PATH=$HOME/bin:/usr/local/bin:/sbin:/usr/sbin:$PATH #如果没有找到export PATH=$HOME/bin:/usr/local/bin:$PATH #则直接添加: export PATH=$HOME/bin:/usr/local/bin:/sbin:/usr/sbin:$PATH #如果需要安装java环境,则在文件最后添加: export JAVA_HOME=/home/zhuxindong/Java8 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
-推荐一个用起来还不错的zsh配置
https://github.com/LzVae/vim/blob/master/etc/zshrc.zsh
直接把这一段复制到.zshrc里面就行啦
- 最后重启:
sudo reboot