AI 生成的摘要
更新軟體源並安裝 zsh 及基本依賴,使用以下指令:
1. 更新軟體源:
```bash
sudo apt update && sudo apt upgrade -y
```
2. 安裝 zsh、git、curl 和 wget:
```bash
sudo apt install zsh git curl wget -y
```
3. 設定 zsh 為預設終端:
```bash
chsh -s /bin/zsh
```
4. 安裝 Oh My Zsh:
- 官方源:
```bash
sh -c "$(wget -O- https://install.ohmyz.sh/)"
```
- 國內鏡像:
```bash
sh -c "$(wget -O- https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh)"
```
5. 安裝 haoomz 主題:
```bash
sudo wget -O $ZSH_CUSTOM/themes/haoomz.zsh-theme https://cdn.haoyep.com/gh/leegical/Blog_img/zsh/haoomz.zsh-theme
```
6. 啟用 haoomz 主題,編輯 `~/.zshrc`,更改主題為:
```bash
ZSH_THEME="haoomz"
```
然後執行:
```bash
source ~/.zshrc
```
7. 安裝命令預測插件 zsh-autosuggestions:
```bash
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
```
8. 安裝命令語法高亮插件 zsh-syntax-highlighting:
```bash
git clone https://github