Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] my gentoo wont read .bashrc automatically
Date: Tue, 01 Sep 2009 16:08:00
Message-Id: 200909012315.12594.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] my gentoo wont read .bashrc automatically by Renat Golubchyk
1 On Tuesday 01 September 2009 14:24:10 Renat Golubchyk wrote:
2 > Hi!
3 >
4 > On Tue, 1 Sep 2009 20:09:12 +0800
5 >
6 > Xi Shen <davidshen84@××××××××××.com> wrote:
7 > > every time i reboot the system, the ~/.bashrc will not be
8 > > read/executed automatically. i have give it x attribute. also i have
9 > > checked the /etc/bash/bashrc file, and i did not find and logic about
10 > > reading/executing the ~/.bashrc file. is there anything wrong with my
11 > > system?
12 >
13 > You don't need the executable bit set on bashrc. ~/.bashrc gets read
14 > when you start an interactive shell, e.g. an xterm. When you log in a
15 > login shell is started, which reads ~/.bash_profile. If you want that
16 > your ~/.bashrc will be read on login include the following statement
17 > in ~/.bash_profile
18 >
19 > [[ -f ~/.bashrc ]] && . ~/.bashrc
20
21 The standard bash_profile shipped in skel even has a comment directly above
22 that (commented) line saying something to the effect of "uncomment the
23 following line to have .bashrc read at every new shell"...
24
25 --
26 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] my gentoo wont read .bashrc automatically Xi Shen <davidshen84@××××××××××.com>