PATH Issues

Chris G cl at isbd.net
Wed May 21 14:36:40 UTC 2008


On Wed, May 21, 2008 at 10:31:44AM -0400, Sieranski, Greg wrote:
> Chris G wrote:
>> On Wed, May 21, 2008 at 10:21:53AM -0400, Sieranski, Greg wrote:
>>   
>>> I have the following in my .bash_profile
>>>
>>> CVS_RSH=ssh
>>> DAISY_HOME=$HOME/src/quoininc.com/daisy/projects/daisy-2.0.1
>>> EDITOR=/usr/bin/vim
>>> GREP_COLOR='1;32'
>>> JAVA_HOME=$HOME/opt/jdk1.6.0_06
>>> PATH=${JAVA_HOME}/bin:$HOME/opt/hg:/sbin:$HOME/bin:$PATH
>>>
>>> export CVSROOT
>>> export CVS_RSH
>>> export DAISY_HOME
>>> export EDITOR
>>> export GREP_COLOR
>>> export JAVA_HOME
>>> export PATH
>>>
>>> alias grep='grep --color=always'
>>> alias la='env LC_ALL=C ls --color=tty -I lost+found -Fla'
>>> alias ll='env LC_ALL=C ls --color=tty -I lost+found -Fl'
>>> alias ls='env LC_ALL=C ls --color=tty -I lost+found -F'
>>> alias vi=$EDITOR
>>>
>>> PS1="[\w] "
>>>         case `id -u` in
>>>               0) PS1="${PS1}# ";;
>>>               *) PS1="${PS1}$ ";;
>>>         esac
>>>
>>>
>>> when I do echo $PATH I get:
>>>
>>> /home/gps/opt/jdk1.6.0_06/bin:/home/gps/opt/hg:/sbin:/home/gps/bin:/home/gps/opt/jdk1.6.0_06/bin:/home/gps/opt/hg:/sbin:/home/gps/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
>>>
>>> if you notice I have the jdk, hg , ~/bin being added to the path twice. 
>>> Does anyone know why this is happening?
>>>
>>>     
>> I think you'll find that ~/bin at least is added by the default
>> profile scripts in /etc.  Maybe the others are too by some additions
>> made when you install java etc.
>>
>>   
> I removed everything from the PATH so it's just PATH=$PATH and now I get 
> the following:
>
> /home/gps/opt/jdk1.6.0_06/bin:/home/gps/opt/hg:/sbin:/home/gps/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
>
> which is what I wanted. I just don't understand how it is able to find 
> these without explicitly specifying them in the PATH??
>
You are actually logging out and then logging back in between changes
are you?  (Silly question but then I've done some pretty silly things
and puzzled myself no end!)

-- 
Chris Green




More information about the fedora-list mailing list