Gentoo Archives: gentoo-user

From: Renat Golubchyk <ragermany@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] my gentoo wont read .bashrc automatically
Date: Tue, 01 Sep 2009 07:15:33
Message-Id: 20090901142410.680eb2d6@symbox
In Reply to: [gentoo-user] my gentoo wont read .bashrc automatically by Xi Shen
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)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] my gentoo wont read .bashrc automatically Alan McKinnon <alan.mckinnon@×××××.com>