Rocky Linux 9 安装 Oh My Zsh
目录
安装依赖
dnf -y install zsh git util-linux-user
安装 oh my zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
这里需要输入y设置zsh为默认shell
安装常用插件
自动补全插件 zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions
语法高亮插件 zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
编辑.zshrc文件启用插件 找到 plugins= 这一行,添加zsh-autosuggestions zsh-syntax-highlighting,例如:
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
更新环境变量
source ~/.zshrc