zsh 和 ohmyzsh 安裝

181 次閱讀
尚無留言

將預設 shell 由 bash 換成 zsh 很好用,故作筆記下來

apt-get -y install zsh
apt-get -y install wget git curl vim fonts-hack-ttf

切換成預設 shell:
chsh -s $(which zsh)
然後重新登入終端生效

安裝 ohmyzsh:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

安裝插件:
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

啟動主題和插件:
nano ~/.zshrc
修改:
ZSH_THEME="powerlevel10k/powerlevel10k"
https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)

立即生效:
source ~/.zshrc
或重新登入終端也可以

正文完
 0
admin
版權聲明:本站原創文章,由 admin 於 2025-04-30 發表,共計 797 字。
轉載說明:除特殊說明外本站文章皆由 CC-4.0 協議發佈,轉載請註明出處。
評論(尚無留言)
驗證碼