2.2 KiB
2.2 KiB
tags, aliases, date, time, description
| tags | aliases | date | time | description |
|---|---|---|---|---|
| 2025-08-18 | 11:56:38 |
安裝必要的套件
sudo apt install wget git curl vim -y
安裝 Patched 字型
到 Nerd font 安裝你喜歡的字型。 記得將 terminal 的字型更改為你剛剛安裝的字型。
安裝 Zsh
shell 輸入
sudo apt install zsh -y
安裝 Oh My Zsh
輸入以下指令安裝 Oh My Zsh,安裝完畢後,按下 Enter 同意把預設 Shell 換成 Zsh。
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
設定預設 Shell
若之前並沒有成功設定修改預設 Shell,請執行以下指令:
chsh -s $(which zsh)
執行 zsh 開始使用
zsh
安裝插件
安裝以下插件的時候,
請確定已安裝好 Oh My Zsh ,且目前正在使用的 Shell 是 Zsh。
主題 PowerLevel10k
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
插件 zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
插件 zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
啟動插件
vi ~/.zshrc
點擊 i ,進入編輯模式。
-
修改主題
ZSH_THEME="powerlevel10k/powerlevel10k"
-
新增要啟動的插件 (Plugins)
plugins=(git zsh-autosuggestions zsh-syntax-highlighting zsh-z)- 點擊
ESC跳出編輯模式。 - 輸入
:wq儲存。
-
應用修改過的 zshrc
source ~/.zshrc
應用修改之後,因為第一次使用 Powerlevel10k,會自動啟動設定,按造需求完成設定即可。