bash配置文件:
全局配置:
/etc/profile, /etc/profile.d/*.sh, /etc/bashrc
个人配置:
~/.bash_profile, ~/.bashrc
profile类文件的作用:
设定环境变量
运行命令或者脚本
bashrc类文件的作用:
设定本地变量
定义命令别名
登录式shell读取配置文件的流程:
/etc/profile
/etc/profile.d/*.sh
~/.bash_profile
~/.bashrc
/etc/baserc
非登录式shell读取配置文件的流程:
~/.bashrc
/etc/bashrc
/etc/profile.d/*.shbash配置文件
原文:http://blog.csdn.net/ucan23/article/details/45314077