全局安装zsh 、oh-my-zsh
su
git clone https://github.com/robbyrussell/oh-my-zsh.git /etc/oh-my-zsh
cp /etc/oh-my-zsh/templates/zshrc.zsh-template /etc/skel/.zshrc
sed -ie 's|$HOME/.oh-my-zsh|/etc/oh-my-zsh|g' /etc/skel/.zshrc
echo "export ZSH_CACHE_DIR=~/.oh-my-zsh/cache" >> /etc/skel/.zshrc
sudo apt-get install fonts-powerline
mkdir -p /etc/skel/.oh-my-zsh/cache
git clone https://github.com/zsh-users/zsh-autosuggestions (自动补全插件)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git (代码高亮插件)
安装完成后到/etc/skel/.zshrc文件里将插件包含进去
直接在/etc/skel/.zshrc里面改
将bash中的变量复制到/etc/skel/.zshrc中,避免出现ZSH:command not found问题
export ****
vi /etc/default/useradd
将 SHELL= *** 改成 SHELL=/bin/zsh
切换成需要zsh的用户
直接复制/etc/skel/.zshrc 到 ~/
cp /etc/skel/.zshrc ~USER_TO_UPDATE/.zshrc
source ~/.zshrc
END
进阶调试
在/etc/oh-my-zsh/custom/plugins目录新建inrc插件目录
下载插件到incr目录
wget http://mimosa-pudica.net/src/incr-0.2.zsh
在/etc/skel/.zshrc文件中引用
source /etc/oh-my-zsh/custom/plugins/incr/incr*.zsh
cp /etc/skel/.zshrc ~USER_TO_UPDATE/.zshrc
删除家目录下的下列文件夹
rm -rf ~/.zcompdump*
exec zsh
卸载zsh
推荐的主题
ys
jovial
kimwz
Solus
blokkzh
fishbone++
Pure