bash 在我的主目录中找不到 .bash_profile

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5227692/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 23:35:18  来源:igfitidea点击:

Can't find .bash_profile in my home directory

bashrvm

提问by Amit Erandole

Possible Duplicate:
How do I find .bash_profile and add to my shell's initialization file?

可能的重复:
如何找到 .bash_profile 并将其添加到我的 shell 的初始化文件中?

I can't find this file: .bash_profile. I am trying to upgrade ruby via rvm and I need to add rvm to every new shell window that opens. But I can't find .bash_profile anywhere on my system.

我找不到这个文件:.bash_profile。我正在尝试通过 rvm 升级 ruby​​,我需要将 rvm 添加到每个打开的新 shell 窗口中。但是我在系统上的任何地方都找不到 .bash_profile 。

采纳答案by 0xC0000022L

It's a simple shell script, just create it and fill it with the desired content.

这是一个简单的 shell 脚本,只需创建它并用所需的内容填充它。

man bashdescribes for which (initialization) files Bash looks under what circumstances and in which order it does it for your particular Bash version.

man bash描述了 Bash 在什么情况下查看哪些(初始化)文件以及它针对您的特定 Bash 版本执行的顺序。