Blog Detail

  • Home
  • zsh+oh-my-zsh配置教程

zsh+oh-my-zsh配置教程

安装zsh

yum install zsh

设置zsh为默认shell

chsh -s /bin/zsh
echo $SHELL 查看当前默认shell

安装oh-my-zsh

方法命令
curlsh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
wgetsh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fetchsh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
  • 手动安装
    • oh-my-zsh的github仓库下载zip包
    • 上传服务器 解压zip包 重命名为.oh-my-zsh
      • unzip ohmyzsh
      • mv ohmyzsh .oh-my-zsh
    • cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
    • source ~/.zshrc 将配置生效

查看主题

ls ~/.oh-my-zsh/themes

修改主题

编辑~/.zshrc文件,将ZSH_THEME=”steeef”,即将主题修改为steeef。我采用的rkj-repos

zsh扩展

~/.zshrc中找到plugins关键字,自定义启用的插件了,系统默认加载git。

Write a comment