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

PATH confusion in BASH

According to "man bash",

When  bash is invoked as an interactive login shell, or as a non-inter-
active shell with the --login option, it first reads and executes com- mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that
       exists and is readable.

In /etc/profile are these statements (they're the only path-related statements in this file):

export PATH

I do not have a ~/.bash_login nor a ~/.profile. There are no path-related statements in my ~/.bashrc, and the only path-related statements in my ~/.bash_profile are these:

# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then

(Interestingly, I don't see an "export PATH".)

But at a BASH prompt, this is the result:

westk[@westk03]:/home/westk> echo $PATH

which does not have my ~/bin, nor the same path as defined in /etc/profile. Where is my path being set then?



Reply to: