oh-my-zsh安装与配置

孤人 提交于 2020-02-01 02:38:28

基本组件:
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 配置。

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!