bash_profile question
Paul Pianta
ppianta at videotron.ca
Mon Apr 4 20:40:51 UTC 2005
Hi
My default ~/.bash_profile has the following in it ...
# set PATH so it includes user's private bin if it exists
if [ -d ~/bin ] ; then
PATH=~/bin:"${PATH}"
fi
and I have created a 'bin' directory in my home ...
pantz at faramir:~$ ll ~/
total 12
drwxr-xr-x 2 pantz pantz 4096 2005-04-04 15:02 bin
drwxr-xr-x 2 pantz pantz 4096 2005-04-03 22:13 Desktop
drwxr-xr-x 2 pantz pantz 4096 2005-03-11 17:56 Templates
Can someone tell me why when I echo $PATH my home 'bin' dir doesn't show
up (p.s. - ignore the /home/pantz/.local/bin - it is there because of an
'autopackage' test)
pantz at faramir:~$ echo $PATH
/home/pantz/.local/bin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games
but then I do this ...
pantz at faramir:~$ PATH=~/bin:"${PATH}"
pantz at faramir:~$ echo $PATH
/home/pantz/bin:/home/pantz/.local/bin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games
or this ...
pantz at faramir:~$ . .bash_profile
pantz at faramir:~$ echo $PATH
/home/pantz/bin:/home/pantz/.local/bin:/home/pantz/.local/bin:/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games
and it is all ok with /home/pantz/bin showing up first.
My question is - why is my bash_profile not being automatically sourced
each time I open a new terminal?
thanks
pantz
More information about the ubuntu-users
mailing list