免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1864 | 回复: 4
打印 上一主题 下一主题

.profile 与.bash_profile有什么区别啊 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-12 20:31 |只看该作者 |倒序浏览
.profile 与.bash_profile有什么区别啊

论坛徽章:
0
2 [报告]
发表于 2008-11-12 20:38 |只看该作者
.profile 所有的用户都会调用(全局)
.bash_profile只是本身用户会调用(局部)

论坛徽章:
23
15-16赛季CBA联赛之吉林
日期:2017-12-21 16:39:27白羊座
日期:2014-10-27 11:14:37申猴
日期:2014-10-23 08:36:23金牛座
日期:2014-09-30 08:26:49午马
日期:2014-09-29 09:40:16射手座
日期:2014-11-25 08:56:112015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:49:0315-16赛季CBA联赛之山东
日期:2017-12-21 16:39:1915-16赛季CBA联赛之广东
日期:2016-01-19 13:33:372015亚冠之山东鲁能
日期:2015-10-13 09:39:062015亚冠之西悉尼流浪者
日期:2015-09-21 08:27:57
3 [报告]
发表于 2008-11-12 21:37 |只看该作者
原帖由 7717060 于 2008-11-12 20:38 发表
.profile 所有的用户都会调用(全局)
.bash_profile只是本身用户会调用(局部)


/etc/profile 才是“所有的用户都会调用(全局)”的吧
.profile 应该是ksh用的。

论坛徽章:
0
4 [报告]
发表于 2008-11-13 12:36 |只看该作者
.profile是用户自定义的,当初始化的过程中,首先执行/etc/profile,之后搜索.bash_profile,没有则搜索.bash_login,再没有则搜索.profile

论坛徽章:
3
戌狗
日期:2014-09-10 17:07:162015年辞旧岁徽章
日期:2015-03-03 16:54:15wusuopu
日期:2016-06-17 17:43:45
5 [报告]
发表于 2008-11-13 12:47 |只看该作者
原帖由 aximofu 于 2008-11-13 12:36 发表
.profile是用户自定义的,当初始化的过程中,首先执行/etc/profile,之后搜索.bash_profile,没有则搜索.bash_login,再没有则搜索.profile

嗯。man bash中有
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads  and  executes  commands 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,
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP