先安裝zsh
yum -y install zsh
# 查看是否安裝完成
cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/dash
/bin/tcsh
/bin/csh
/bin/zsh
# 替換默認的 /bin/bash
chsh -s /bin/zsh
Changing shell for root.
Shell not changed.
# 重啟一下
reboot
# 查看現在的shell
echo $SHELL
/bin/zsh
安裝oh-my-zsh
手動安裝
# 安裝git
yum -y install git
#克隆oh-my-zsh
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
#復制zshrc
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
自動安裝
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
不管使用手動或者自動安裝,完成后都需要重啟,oh-my-zsh才能生效,
修改主題
挑選你喜歡的主題:https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
vim ~/.zshrc
ZSH_THEME=bira

轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/115523.html
標籤:Linux
下一篇:Linux安裝Redis
