bashrc doesn't set alias

Dagmar d'Surreal dagmar.wants at
Wed Jul 30 10:17:34 PDT 2003

On Wed, 2003-07-30 at 11:55, Jason and Kristi Cowan wrote:
> My " alias ls='ls --color=auto' " wasn't being set from /etc/bashrc
> when I logged in.  I took a look at the man page for bash and it says
> that bash reads /etc/profile then check for ~/.bash_profile,
> ~/.bash_login and ~/.profile and read the first one that it finds.  If
> bash is started as an interactive non-login shell, it reads
> ~/.bashrc.  Nowhere was /etc/bashrc mentioned in the man page, that I
> could find.  According to the book V1.0 II.3 The Bash Shell Startup
> Files the alias goes in /etc/bashrc along with any global aliases and
> functions that the admin wants to set, but it appears that /etc/bashrc
> is never looked at by bash.  Did I miss the boat on this one, or is
> there a problem?

Nope.  As has been stated recently, /etc/bashrc is nothing at all.  
Bash never reads it on it's own.
> I fixed it by adding "source /etc/bashrc" to the end of /etc/profile,
> but I don't know if that is a good way to get the job done or not.

You may wish to add that to ~/.bashrc as well, since /etc/profile isn't
always called and aliases don't carry through into subshells.
The email address above is just as phony as it looks, and for obvious reasons.
Instant messaging contact nfo: AIM: evilDagmar  Jabber: evilDagmar at

More information about the blfs-support mailing list