本文介绍了其中登录bash脚本或〜/ .profile文件MAC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想安装一个软件包,并在自述它说:
I want to install a package and in the README it says:
Add the following line to your login bash script (e.g., ~/.profile)
我找不到任何人对我的MAC,都坐落在哪里?
I cannot find any of them on my mac, where are they located?
推荐答案
在默认情况下的bash只读取的/ etc / bashrc中
在Mac上启动时,但你可以(也应该)继续创建〜/ .profile文件
与任何命令你需要,你的bash命令将在启动时读取它。
By default bash reads only /etc/bashrc
at startup on mac, but you can (and should) go ahead and create ~/.profile
with whatever commands you need, and your bash session will read it at startup.
正如你所预料的,在的/ etc /
将启动一个bash会话中的每个用户执行,而文件〜/ 文件code>将只为你执行。
As you might expect, files in /etc/
will be executed for every user starting a bash session, whereas files in ~/
will be executed only for you.
本优秀导游解释说:
这篇关于其中登录bash脚本或〜/ .profile文件MAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!