基本组件:
yum install -y zsh git
安装 oh my zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
查看 zsh 的安装目录:which zsh
使用 chsh 命令切换使用的 shell 程序
chsh -s /usr/bin/zsh
安装 ZSH 图标字体:
git clone https://github.com/powerline/fonts.git
更换 ZSH 主题:
使用 vi 工具编辑 .zshrc文件,更改 ZSH_THEME=“robbyussell” 字段为 ZSH_THEME=“你想要的主题”
source ~/.zshrc 命令更新配置文件。
安装插件:
wd、zsh-syntax-highlighting、zsh-autosuggestions 。
依次执行:
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
git clone https://github.com/zsh-users/zsh-autosuggestions.git
vi 编辑 ~/.zshrc 文件:
plugins=(git wd zsh-syntax-highlighting zsh-autosuggestions)
source /root/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
这里的路径你用root用户git的就是root,非root用户就改成你用户名字。
执行 source ~/.zshrc 命令更新 ZSH 配置。
来源:CSDN
作者:qq_40939063
链接:https://blog.csdn.net/qq_40939063/article/details/103637760