MacBook 安装 zsh
1.查看当前系统装了哪些shell cat /etc/shells
2.当前正在运行的是哪个版本的shell echo $SHELL
3.切换zsh chsh -s /bin/zsh
4.安装oh my zsh
官方地址:https://github.com/robbyrussell/oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
5.设置zsh的参数 安装完zsh后,在home目录下会有一个名为.zshrc的隐藏文件,可以根据个人习惯配置zsh的参数
oh my zsh 在安装时已经自动读取当前的环境变量并进行了设置,你可以继续追加其他环境变量 oh my zsh各式各样的主题预览:https://github.com/robbyrussell/oh-my-zsh/wiki/themes
备份 cp ~/.zshrc ~/.zshrc.bak
替换 cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
设置主题 vim ~/.zshrc ZSH_THEME=“robbyrussell”