最近接连整了几台服务器的环境,觉得有必要记下来。
安装zsh
1 | sudo apt-get install zsh # 安装 |
安装oh-my-zsh(via git)
1 | sudo apt-get install git # 安装git |
安装插件
将对应的插件安装到$ZSH_CUSTOM/plugins
目录中,并在~/.zshrc
文件的plugins
中添加引用,最后source ~/.zshrc
即可。
语法高亮
1 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting |
自动补全
1 | git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions |
配置主题
与安装插件类似,将主题安装到$ZSH_CUSTOM/themes
目录中,并在~/.zshrc
文件的ZSH_THEME
中修改当前主题,最后source ~/.zshrc
即可。
卸载zsh(暂无必要)
1 | sudo sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/uninstall.sh)" |