基本组件:
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 配置。
oh-my-zsh安装与配置
最新推荐文章于 2025-10-14 01:14:26 发布
本文详细介绍如何通过YUM安装ZSH并配置Oh My ZSH,包括安装过程、主题设置、字体安装及实用插件的添加,如zsh-syntax-highlighting和zsh-autosuggestions,以提升Shell使用体验。
1336

被折叠的 条评论
为什么被折叠?



