which .profile is used

Chris Kassopulo ckasso
Mon May 17 11:39:17 PDT 2004


On Tue, 16 Apr 2002 20:44:31 -0500
"David A. Bandel" <david at pananix.com> wrote:

> I'd try something like this (files that don't exist are ignored):
> login shell (SHLVL=1):
> /etc/profile
> $HOME/.profile
> $HOME/.bash_profile
> 
> non-login shell (SHLVL>=2):
> /etc/bashrc
> $HOME/.bashrc
> 
> On logout:
> /etc/logout
> $HOME/.logout
> $HOME/.bash_logout

Qualifiers added.

files that don't exist are ignored

login shell (SHLVL=1):
  /etc/profile and
  $HOME/.profile or
  $HOME/.bash_profile or
  $HOME/.bash_login
 
non-login shell (SHLVL>=2):
  /etc/bashrc and
  $HOME/.bashrc

logout:
  /etc/logout and
  $HOME/.logout or
  $HOME/.bash_logout
 
Chris Kassopulo


More information about the Linux-users mailing list