分析系统:ubuntu 10.0.04
放在启动脚本中的典型内容包括:
① 本地变量设置,特别是PS1
② 环境变量 例如 PATH
③ 别名
④ umask
启动系统:
/etc/enviroment
登录shell(登录交互):
1、/etc/profile → /etc/profile.d→ /etc/bash.bashrc
2、(.bash_profile|.bash_login|.profile) → .bashrc
3、 退出时调用.bash_logout
非登录shell(非登录交互):
1、/etc/bash.bashrc
2、.bashrc
登录图形(登录非交互):
1、/etc/profile → /etc/profile.d
2、(.bash_profile|.bash_login|.profile)
3、 退出时调用.bash_logout
登录shell情况:
用户shell登录、"$ su -" 、“$ bash --login”
非登录shell情景:
图形界面进入xtrem、“$ su”、“$ bash”