Re: Login Shells

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2002-12-05 at 01:10, Havoc Pennington wrote:
[snip]
> When a
> shell finds out that it's a login shell, it does some special things
> such as load ~/.bash_profile. 

I want to mention for completeness that the login initialization process
is uglier than this.  Due to backward compatibility and cruft, bash
login shells look for three special files and execute the first one they
find of:

~/.bash_profile
~/.bash_login
~/.profile

A default Red Hat installs a .bash_profile so it is not much of an
issue, but other distros don't.  Also, there are many other init files
like ~/.bashrc (which gets called from .bash_profile on Red Hat), and
/etc/profile (which executes all the scripts in /etc/profile.d/*.sh on
Red Hat).  Anyway, all the gory details can be found in "man bash" and
tracing all the scripts starting from /etc/profile.  A fun exercise!

Best Regards,
Keith
-- 
LPIC-2, MCSE, N+
We drive on this highway of fire
Got spam? Get spastic http://spastic.sourceforge.net



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux