banner
NEWS LETTER

Ubuntu 安装 zsh 以及配置oymyzsh

Scroll down

1.安装zsh

1
apt install zsh -y

2.克隆 oh-my-zsh

1
git clone git@gitee.com:crackersw/ohmyzsh.git ~/.oh-my-zsh

3.复制 zshrc 模版

1
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

4.选择默认shell客户端

1
chsh -s $(which zsh)

5.安装插件

自动补全插件 zsh-autosuggestions
  • 克隆zsh-autosuggestions
1
git clone https://gitee.com/phpxxo/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  • 修改 ~/.zshrc,把 zsh-autosuggestions添加到要加载的插件列表中
1
plugins=(git zsh-autosuggestions)
高亮常用命令插件 zsh-syntax-highlighting
  • 克隆zsh-syntax-highlighting
1
git clone git@gitee.com:hubert22/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  • 修改 ~/.zshrc,把zsh-syntax-highlighting添加到要加载的插件列表中
1
2
3
4
5
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
其他文章
请输入关键词进行搜索