1.安裝 zsh
1.從 Repository 安裝
#sudo apt-get install zsh
2.更換 Shell
#chsh -s /bin/zsh
#curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
3.變更 theme
變更 theme 為 agnoster
#sudo vi ~/.zshrc
找到 ZSH_THEME 設定為 agnoster
4.例外狀況,如果有出現 ? 或沒有正常顯示,至 https://gist.github.com/agnoster/3712874 更新 agnoster 的 theme 內容
#sudo vi ~/.oh-my-zsh/themes/agnoster.zsh-theme
接著將內容替換掉,done
Symbol | powerline | vim-powerline |
---|---|---|
separator.left | '' (\ue0b0) | '⮀' (\u2b80) |
separator.right | '' (\ue0b2) | '⮂' (\u2b82) |
subseparator.left | '' (\ue0b1) | '⮁' (\u2b81) |
subseparator.right | '' (\ue0b3) | '⮃' (\u2b83) |
branch symbol | '' (\ue0a0) | '⭠' (\u2b60) |
readonly symbol | '' (\ue0a2) | '⭤' (\u2b64) |
linecolumn symbol | '' (\ue0a1) | '⭡' (\u2b81) |
chsh -s /bin/zsh
You can confirm the location of zsh by running whereis zsh, or alternatively simply run
chsh -s $(which zsh)
If you want to change the shell for a user account other than the one you're logged into, you'll need to run it as root, so to change john's shell, do:
sudo chsh -s $(which zsh) john
echo $SHELL