Ubuntu 打开新终端时,.bashrc或.bash_配置文件似乎都没有执行
当我打开一个新的终端窗口时,这两个脚本似乎都没有运行。这些脚本的运行设置在哪里?如果我手动运行Ubuntu 打开新终端时,.bashrc或.bash_配置文件似乎都没有执行,ubuntu,ubuntu-14.04,Ubuntu,Ubuntu 14.04,当我打开一个新的终端窗口时,这两个脚本似乎都没有运行。这些脚本的运行设置在哪里?如果我手动运行source~/.bashrc,那么我会看到我在其中配置的更改(例如颜色) 顺便说一下,我使用的是Ubuntu 14.04,man bash(部分)在调用下说 When bash is invoked as an interactive login shell, or as a non-inter‐ active shell with the --login option, it fir
source~/.bashrc
,那么我会看到我在其中配置的更改(例如颜色)
顺便说一下,我使用的是Ubuntu 14.04,man bash(部分)在调用下说
When bash is invoked as an interactive login shell, or as a non-inter‐
active shell with the --login option, it first reads and executes com‐
mands from the file /etc/profile, if that file exists. After reading
that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
in that order, and reads and executes commands from the first one that
exists and is readable. The --noprofile option may be used when the
shell is started to inhibit this behavior.
When an interactive shell that is not a login shell is started, bash
reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
these files exist. This may be inhibited by using the --norc option.
The --rcfile file option will force bash to read and execute commands
from file instead of /etc/bash.bashrc and ~/.bashrc.
确保.bashrc
设置了执行位
chmod +x $HOME/.bashrc