Joh*_*024 27
当 bash 在类似 Debian/Ubuntu 的系统上初始化非登录交互式 bash shell 时,shell 首先/etc/bash.bashrc
读取~/.bashrc
.
,之所以/etc/bash.bashrc
没有出现正常的bash文档(如在这里或点击这里)是,它是一个由Debian添加和被Ubuntu采用了功能。正如 Debian 解释的那样(readme.debian):
- 什么是/etc/bash.bashrc?它似乎没有记录。
Debian 版本的 bash 使用一个特殊选项 (
-DSYS_BASHRC
) 进行编译,该选项使 bash/etc/bash.bashrc
在~/.bashrc
交互非登录 shell之前被读取。因此,在Debian系统,/etc/bash.bashrc
是~/.bashrc
为/etc/profile
是~/.bash_profile
。
因此,/etc/bash.bashrc
在 Debian 和 Ubuntu 手册页中有记录,但在其他不支持此功能的发行版的手册页中没有记录。
/etc/bash.bashrc
已经在 Debian 圈子之外被采用,因为评论表明它在 Arch Linux、MSYS2 和 Git Bash 等发行版中的使用。
归档时间: |
|
查看次数: |
19969 次 |
最近记录: |