bash配置文件

时间:2015-04-27 20:12:58   收藏:0   阅读:241
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/*.sh

原文:http://blog.csdn.net/ucan23/article/details/45314077

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!