一、原因
最新系統(tǒng)的macbook把zsh作為默認(rèn)shell,而環(huán)境變量添加到了bash中,把 bash shell 中.bash_profile 全部環(huán)境變量加入zsh shell里就可以啦
二、解決辦法
1、打開(kāi)終端,然后輸入下面命令,查看.bash_profile的配置,復(fù)制
cat .bash_profile
2、然后輸入下面命令打開(kāi).zshrc,把剛才.bash_profile復(fù)制的內(nèi)容粘貼進(jìn)來(lái),然后:wq保存退出
vim .zshrc
3、輸入下面命令更新配置文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-685956.html
source ~/.zshrc
文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-685956.html
到了這里,關(guān)于解決 zsh:command not found的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!