ubuntu16.04安装zsh

1 安装

sudo apt-get install zsh

2 修改默认shell

chsh -s /bin/zsh

3 配置passwd

sudo vim /etc/passwd
root:x:0:0:root:/root:/bin/bash改成root:x:0:0:root:/root:/bin/zsh

4 手动安装oh-my-zsh

git clone https://gitee.com/roclyp/oh-my-zsh
cd /home/lyp/oh-my-zsh/tools
./install.sh (这个会有些耗时)
问题:/install.sh 失败会未配置~/.zshrc :
解决:
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
重新.install.sh

5 配置主题

vim ~/.zshrc
ZSH_THEME="robbyrussell" (默认主题)
修改ZSH_THEME 即可
ubuntu16.04安装zsh source
~/.zshrc 主题:https://github.com/ohmyzsh/ohmyzsh/wiki/themes

6插件安装

 autojump、zsh-autosuggestion 和 zsh-syntax-highlighting 

7打开终端查看

 

ubuntu16.04安装zsh

上一篇:linux(CentOS7)安装 jdk1.8 详细步骤


下一篇:Shell编程知识2