首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Bash文件- /etc/profile vs ~/.bash_profile文件

Bash文件- /etc/profile vs ~/.bash_profile文件
EN

Ask Ubuntu用户
提问于 2014-11-04 14:32:40
回答 1查看 1.4K关注 0票数 0

有人知道/etc/profile文件和~/..bash_profile文件之间的区别吗?哪个是先执行的?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2014-11-04 14:49:44

代码语言:javascript
复制
   When bash is invoked as an interactive login shell, or as a  non-inter‐
   active  shell with the --login option, it first reads and executes com‐
   mands from the file /etc/profile, if that file exists.   After  reading
   that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
   in that order, and reads and executes commands from the first one  that
   exists  and  is  readable.  The --noprofile option may be used when the
   shell is started to inhibit this behavior.

这是从man bash逐字提取的。男人是你的朋友:)

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/545591

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档