將預設 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
或重新登入終端也可以