|
楼主 |
发表于 2011-10-30 22:51:02
|
显示全部楼层
Post by adaptee;2154132
该具体说说的是你啊,你在什么情况使用bash发现不读取 .bashrc ?
以下摘自 bash(1)
给你看一段话,是直接从ARCH的WIKI上拿来的,注意最后一段话
if interactive + login shell → /etc/profile then the first readable of ~/.bash_profile, ~/.bash_login, and ~/.profile,Bash will source ~/.bash_logout upon exit.
if interactive + non-login shell → /etc/bash.bashrc then ~/.bashrc
if login shell + legacy mode → /etc/profile then ~/.profile
But, in Arch, by default:
/etc/profile (indirectly) sources /etc/bash.bashrc
/etc/skel/.bash_profile which users are encouraged to copy to ~/.bash_profile, sources ~/.bashrc
which means that /etc/bash.bashrc and ~/.bashrc will be executed for all interactive shells, whether they are login shells or not.
这上面说不管怎么样,只要以交互SHELL登录,都会读.bashrc,我打开终端模拟器,会去读.bashrc吧?可是就是不读呢= =
我是在弄openbox的时候发现这个情况的,终端模拟器是gnome terminal |
|