Ben Barrett wrote,
>Dirk, if you want it to be in user environments system-wide, you can add
>it into your /etc/profile if this is the redhat system.  It won't affect
>any existing/open terminal shells, until you run 'source' as Cory
>suggests... in fact, I'm curious about whether a users gets /etc/profile
>settings at login time, or whenever a shell is launched.  Any redhat
>trainers reading this?

No need to wait for a Redhat expert to come along...it's described fully
in "man bash".  (Nor is it a Redhat-specific thing...it works the same way
on any system that uses bash.)

An interactive login shell starts by running /etc/profile.  Then it does
this:

     if ~/.bash_profile exists, run it
     else if ~/.bash_login exists, run it
          else if ~/.profile exists, run it


An interactive non-login shell ignores all of the above, and looks for
~/.bashrc instead, and runs it if it exists.

The best place for aliases is probably your .bashrc file.  Putting it in
/etc/profile will make it system-wide for login shells, but non-login
shells won't see it (because they don't automatically run /etc/profile).

              - Neil Parker
_______________________________________________
EuG-LUG mailing list
[EMAIL PROTECTED]
http://mailman.efn.org/cgi-bin/listinfo/eug-lug

Reply via email to