我在~/.bash_profile和~/.bashrc下面加了一些个人的设置,重启以后居然没有生效。查了半天,发现没有.bash_profile居然没有被执行。
我是7.10版本的。哪位达人指点一下,ubuntu下不执行该脚本么?难道非要放到root用户的.profile中不成?
[讨论]奇怪bash_profile没有自动执行
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
-
- 帖子: 4
- 注册时间: 2007-10-04 21:11
-
- 帖子: 214
- 注册时间: 2007-07-16 21:42
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first
reads and executes 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.
如果BASH被作为LOGIN shell使用,会按顺序读取:
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
我是加在~/.profile和~/.bash_profile中的
reads and executes 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.
如果BASH被作为LOGIN shell使用,会按顺序读取:
/etc/profile
~/.bash_profile
~/.bash_login
~/.profile
我是加在~/.profile和~/.bash_profile中的
HP Compaq 6515b(GL087PA)
Sawfish+Emacs+Firefox+Xpdf+MPlayer...
Sawfish+Emacs+Firefox+Xpdf+MPlayer...