原因:
oh-my-zsh的配置文件为.zshrc,而默认shell(bash)的配置文件为.bash_profile
如何解决:
- 打开Oh My Zsh的配置文件
.zshrc(vi ~/.zshrc),在其中添加代码:source ~/.bash_profile, - 终端执行
source ~/.zshrc即可
oh-my-zsh的配置文件为.zshrc,而默认shell(bash)的配置文件为.bash_profile
.zshrc(vi ~/.zshrc),在其中添加代码:source ~/.bash_profile,source ~/.zshrc即可