[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: profile of bash
From: |
Bob Proulx |
Subject: |
Re: profile of bash |
Date: |
Mon, 6 Nov 2006 23:27:44 -0700 |
User-agent: |
Mutt/1.5.9i |
Ronald wrote:
> Why bash has so many profiles, like
> .bash_login
> .bash_logout
> .bash_profile
> .profile
> .bashrc
> profile
> bashrc
>
> By design? Why?
It is for legacy support, useful features, compatible capabilities.
The traditional Bourne shell read /etc/profile and $HOME/.profile. So
does AT&T ksh. By reading those files bash is compatible. But
perhaps you want to use both shells and want to use bash extensions?
Therefore bash adds $HOME/.bash_* versions which are specific to bash
and won't be shared with other shells.
Then enter on stage the BSD csh which reads $HOME/.login and
$HOME/.logout. Bash has a different syntax from csh (thankfully) and
can't share those files. But to provide similar capability bash reads
$HOME/.bash_login and $HOME/.bash_logout.
Bob