首页 > 其他 > 详细

bash_profile 和 bashrc 区别的总结

时间:2021-04-01 18:27:52      阅读:13      评论:0      收藏:0      [点我收藏+]

登陆过程:
1. 读取并执行/etc/profile文件;
2. 读取并执行~/.bash_profile文件;
- 若文件不存在,则读取并执行~/.bash_login文件;
- 若文件不存在,则读取并执行~/.profile文件;

登出过程:
1. 读取并执行~/.bash_logout文件;
2. 读取并执行/etc/bash.bash_logout文件;

 

/etc/profile  The systemwide initialization file, executed for login shells。系统初始化文件,在login shells时执行
/etc/bash.bash_logout  The systemwide login shell cleanup file, executed when a login shell exits。系统的登录shell清理文件,当一个登录shell退出时执行。
~/.bash_profile  The personal initialization file, executed for login shells。个人初始化文件,为登录shell执行。
~/.bashrc  The individual per-interactive-shell startup file。每个交互式shell启动文件。
~/.bash_logout  The individual login shell cleanup file, executed when a login shell exits。单个登录shell清理文件,当一个登录shell退出时执行。

bash_profile 和 bashrc 区别的总结

原文:https://www.cnblogs.com/wxp100/p/14607320.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!