PS,关于.bash_profile和.bashrc,参考man bash的以下内容。
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and exe-
cutes commands 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 ~/.bashrc, if that file
exists. 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 ~/.bashrc.
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
这是unbuntu /etc/skel的.profile里面的注释,是.bash_profile,我试了一下在~目录下面添加.bash_login,也是不行