.bashrc 不会被执行

Nul*_*ser 10 bash rhel bashrc

我有一个用户(非 root 用户),其中有一个~/.bashrc包含一些别名的文件。

但它看起来不像是在登录时执行的文件。如果我这样做,source ~/.bashrc它就会做它应该做的事情。但是不是~/.bashrc每次登录时都应该执行吗?

权限设置为 644(与我的 root 相同.bashrc,工作正常)。文件归相关用户所有。

APr*_*mer 18

~/.bashrc用于非登录交互式 shell。登录 shell 源~/.bash_profile(或~/.bash_login~/.profile)。在~/.bashrc那里采购将允许您进行通用设置。