原文:關於Mac OS修改.bash_profile后無法生效問題

當我們在修改.bash profile文件后,發現每次都需要 source .bash profile才可以生效,但是退出終端后就失效了。這時候有可能是因為你使用的不是mac默認的shell,mac默認的shell為bash。 可以先修改用戶的shell,使用命令chsh s bin bash更換shell ...

2020-09-21 22:34 0 3445 推薦指數:

查看詳情

[MAC] 終端bash_profile配置不生效問題

MAC設置環境變量時, 配置的 bash_profile 沒有生效,需要手動執行下面命令才生效。   source ~/.bash_profile 原因:zsh和bash有別, zsh模式不執行上述腳本,bash模式才執行。 zsh、bash 模式互相切換 切換bash ...

Sun Feb 21 02:02:00 CST 2021 0 1074
mac ~/.bash_profile配置重啟生效的解決方法

轉載自:https://www.jianshu.com/p/d16472647ff3 自己在 ~/.bash_profile 中配置環境變量, 可是每次重啟終端配置的不生效.需要重新執行 : $source ~/.bash_profile 發現zsh加載的是 ~/.zshrc文件 ...

Tue Aug 25 00:53:00 CST 2020 0 1274
bash_profile 配置生效

1、打開Terminal(終端) 2、輸入:vi ~/.bash_profile 3、設置PATH:export PATH=/mongodb/bin:$PATH 4、輸入::wq //保存並退出vi 5、修改立即生效:source ~/.bash_profile 6、查看環境變量 ...

Tue Oct 12 16:46:00 CST 2021 0 3948
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM