原文:MacOS配置.bash_profile,重啟終端后配置失效和MacOS .zshrc does not exist問題

MacOS配置.bash profile,重啟終端后配置失效和MacOS .zshrc does not exist問題 場景 在Mac中配置golang環境變量更改GOPATH路徑,在 .bash profile中配置新的路徑,source .bash profile之后關掉終端,再用go env查看GOPATH發現路徑又還原了。 原因 使用的終端是zsh,zsh加載的是 .zshrc文件,而該 ...

2020-06-10 14:45 0 4665 推薦指數:

查看詳情

Mac配置.bash_profile重啟終端配置失效

場景 在Mac中使用mongodb,一般都要在.bash_profile配置一下環境變量,后面使用會比較方便一點。遇到的問題狀況是:配置.bash_profile,source了一下,然后啟動了mongodb,這時又新建了一個終端窗口去連接數據庫,去執行mongo命令,提醒: 原因 ...

Tue Dec 10 21:31:00 CST 2019 0 2018
.bash_profile does not exist

localhost:test jerry$ open .bash_profile The file /Users/je/Desktop/test/.bash_profile does not exist. localhost:test je$ open .bash_profile ...

Fri Jan 25 05:49:00 CST 2019 0 2728
.bash_profile 和.zshrc

說說配置環境變量的方法: vim ~/.bash_profile 進入配置文件 添加路徑例如: PATH=$PATH:\/Users/linyue/mywork/script:\ 保存后退出,source ~/.bash_profile,執行生效的指令 由於我每次關閉 ...

Wed Jun 12 18:53:00 CST 2019 0 2076
.bash_profile 和.zshrc

說說配置環境變量的方法: vim ~/.bash_profile 進入配置文件 添加路徑例如: PATH=$PATH:\/Users/linyue/mywork/script:\ 保存后退出,source ~/.bash_profile,執行生效的指令 由於我每次關閉 ...

Wed Nov 03 18:43:00 CST 2021 0 8145
[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
bash_profile 配置

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

Sat Apr 20 19:45:00 CST 2019 0 6338
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
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM