1 |
Hi! |
2 |
|
3 |
On Tue, 1 Sep 2009 20:09:12 +0800 |
4 |
Xi Shen <davidshen84@××××××××××.com> wrote: |
5 |
> every time i reboot the system, the ~/.bashrc will not be |
6 |
> read/executed automatically. i have give it x attribute. also i have |
7 |
> checked the /etc/bash/bashrc file, and i did not find and logic about |
8 |
> reading/executing the ~/.bashrc file. is there anything wrong with my |
9 |
> system? |
10 |
|
11 |
You don't need the executable bit set on bashrc. ~/.bashrc gets read |
12 |
when you start an interactive shell, e.g. an xterm. When you log in a |
13 |
login shell is started, which reads ~/.bash_profile. If you want that |
14 |
your ~/.bashrc will be read on login include the following statement |
15 |
in ~/.bash_profile |
16 |
|
17 |
[[ -f ~/.bashrc ]] && . ~/.bashrc |
18 |
|
19 |
|
20 |
Cheers, |
21 |
Renat |
22 |
|
23 |
-- |
24 |
Probleme kann man niemals mit derselben Denkweise loesen, |
25 |
durch die sie entstanden sind. |
26 |
(Einstein) |