[plug] /etc/bashrc

Matt Kemner zombie at wasp.net.au
Thu Sep 21 23:00:19 WST 2000


On Thu, 21 Sep 2000, Leon Brooks wrote:

> > I've got a few entries in /etc/bashrc, I was hoping that this would set

> Did you export them? <waves at MattK>

<waves back>
 
The other thing to look out for, is that /etc/bashrc may not be run
always by every shell.

Shell rc files, and which ones are read at what time, is akin to black
magic, and the man page (at least the one I have) doesn't mention
/etc/bashrc at all.

.bash_profile in your home directory is read only when you first log in
(assuming your login shell is bash) and .bashrc is only read if you are
running another copy of bash from within your login shell.

similarly /etc/profile is read only by login shells, so it follows from
there that /etc/bashrc is only read by non-login shells (though again my
manpage doesn't say that)

My suggestion is to add it to /etc/bashrc, and then edit /etc/profile so
that it includes /etc/bashrc by adding the line:

source /etc/bashrc

which can be shortened to:

. /etc/bashrc

 - Matt




More information about the plug mailing list