安装ZSH
1 | # 安装ZSH |
安装OhMyZsh
- 下载安装
官方文档
1 | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
添加插件
语法高亮 zsh-syntax-highlighting参考
1
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
命令提示 zsh-autosuggestions参考
1
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
开启插件
修改.zshrc
的plugins=()
开启插件,git默认开启
1 | plugins=( |
- 重启终端
1 | exec zsh |
安装powerlevel10k主题(可选)
- 终端字体设置
- 使用Ubuntu桌面版按照主题主页方法安装字体即可
- 使用ssh远程连接Ubuntu服务器需要在本地终端软件中设置字体
- 安装主题
1 | git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |
- 修改
.zshrc
的ZSH_THEME
开启主题
1 | ZSH_THEME="powerlevel10k/powerlevel10k" |
- 重启ZSH进入主题配置
1 | exec zsh |