Anthony E. Greene wrote:
----------------->>>>
Paths are set in ~/.bash_profile. Aliases are set in ~/.bashrc.
----------------->>>>
Basically all are loaded when you login

The sequence is (at least on my RH 62 and 72 sys):

  /etc/profile
  ~/.bash_profile
  ~/.bashrc
  /etc/bashrc

Now .bash_profile actually calls .bashrc prior to anything else if it
exists.  Also .bashrc calls /etc/bashrc prior to anything else it does if it
exists.

However, back to your PATH questions.  What I don't understand is how the
PATH statements gets set prior to login in and the /etc/profile gets called.
If you look in /etc/profile one of the first commands is:

  on 62 sys --> PATH="$PATH:/usr/X11R6/bin"
  on 72 sys --> if root (uid of 0)
                 PATH="/sbin:$PATH"
                 PATH="/usr/sbin:$PATH"
                 PATH="/usr/local/sbin:$PATH"
                 PATH="$PATH:/usr/X11R6/bin"

Now if you put a echo $PATH prior to any commands and login it echos the
following: 

  on 62 sys --> users - /usr/local/bin:/bin:/usr/bin 
                root  - /sbin:/bin:/usr/sbin:/usr/bin
  on 72 sys --> users - /usr/local/bin:/bin:/usr/bin 
                root  -
/usr/local/sbin:/usr/local/bin:/sbin:/bin:4/usr/sbin:/usr/bin

which tells me that the path is set somewhere prior to the call to profile.
I've look around and have not found where this default path for users and
root gets set --note that changing them is probably not good idea--, but
these are the things that I have found because I like to know things down at
this level.



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to