Linux下.bash_profile为什么不被执行

~/.bash_profile 是输入帐号密码后启动该 shell的,但是它要求是“login shell mode”模式才读取,我们平时的X下面登录时不一样。所以按下 ctrl-alt-f1 于 console 登入,这是属于 login shell mode,这时候 ~/.bash_profile 会读取。

若是要求 X 下开终端机要自动执行的shell,应该是放在 ~/.bashrc 才对。

Tags: programming Comments: 1