zsh: command not found 解决方法

zsh: command not found 解决方法

最新系统的macbook把zsh作为默认shell,而环境变量添加到了bash中,把 bash shell 中.bash_profile 全部环境变量加入zsh shell里就好

step1:

Term执行

open .zshrc(没有了就自己新建一个)touch .bash_profile 创建.bash_profile 文件

step2:

在弹出的编辑器最下面

加入

source ~/.bash_profile

或者

source .bash_profile

看哪个奏效,这一步就在zshrc执行时将 .bash_profile 全部环境变量加入zsh shell了

保存

step3:

terminal执行

source .zshrc 更新配置

猜你喜欢

转载自blog.csdn.net/weixin_44555878/article/details/109282897