bash配置文件

来源:互联网 发布:eclipse查看源码插件 编辑:程序博客网 时间:2024/05/17 23:09
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
0 0
原创粉丝点击