AI 生成的摘要
更新软件源并安装zsh及基本依赖,命令如下:
1. 更新软件源:`sudo apt update && sudo apt upgrade -y`
2. 安装zsh、git、curl、wget:`sudo apt install zsh git curl wget -y`
3. 设置默认终端为zsh:`chsh -s /bin/zsh`
安装Oh My Zsh:
- 官方源:`sh -c "$(wget -O- https://install.ohmyz.sh/)"`
- 国内镜像:`sh -c "$(wget -O- https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"`
安装haoomz主题并启用:
1. 下载主题:`sudo wget -O $ZSH_CUSTOM/themes/haoomz.zsh-theme https://cdn.haoyep.com/gh/leegical/Blog_img/zsh/haoomz.zsh-theme`
2. 修改配置文件:`nano ~/.zshrc`,将`ZSH_THEME="haoomz"`添加到文件中,保存并执行`source ~/.zshrc`
安装插件:
1. 命令预测插件:`git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions`
2. 命令校验插件:`git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting`
在`~/.zshrc`中启用插件:
```bash
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
```
保存并执行`source ~/.zshrc`,完成安装。