原文: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