bash 我的 Mac 上没有 .bash_profile
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47272164/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
No .bash_profile on my Mac
提问by fumeng
I'm trying to develop using Eclipse/Maven on my Mac and while setting environment variables there is no .bash_profile. I do ls -a and still not there. I see a .bash_history and .bash_sessions. Where am I supposed to set my JAVA_HOME and PATH?
我正在尝试在 Mac 上使用 Eclipse/Maven 进行开发,但在设置环境变量时没有 .bash_profile。我做了 ls -a 但仍然没有。我看到了 .bash_history 和 .bash_sessions。我应该在哪里设置我的 JAVA_HOME 和 PATH?
Thank you!
谢谢!
回答by Brian Wright
In your terminal:
在您的终端中:
touch ~/.bash_profile; open ~/.bash_profile
Then make your edits and save. This is generic so make sure your path is correct in the above example.
然后进行编辑并保存。这是通用的,因此请确保在上面的示例中您的路径是正确的。