其中登录bash脚本或〜/ .profile文件MAC [英] where is login bash script or ~/.profile MAC

查看:225
本文介绍了其中登录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会话中的每个用户执行,而文件〜/ 将只为你执行。

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.

本优秀导游解释说:

http://tldp.org/LDP/Bash-Beginners-指南/ HTML / sect_03_01.html

这篇关于其中登录bash脚本或〜/ .profile文件MAC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆