了解 Bash Shell 环境初始化流程的最好的办法是查看 man bash
, 中间有部分专门描述 Bash Shell 相关的环境配置文件.如下:
FILES
/bin/bash
The bash executable
/etc/profile
The systemwide initialization file, executed for login shells
/etc/bash.bashrc
The systemwide per-interactive-shell startup file
/etc/bash.bash.logout
The systemwide login shell cleanup file, executed when a login shell exits
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
The individual per-interactive-shell startup file
~/.bash_logout
The individual login shell cleanup file, executed when a login shell exits
~/.inputrc
Individual readline initialization file
我们看到 bash man page 中提到 login shells
的概念, 我们先来了解下, 什么是 login shells
? 什么是 no login shells
.
- 阅读剩余部分 -