[ale] bash path problems

Jeff Lightner jlightner at water.com
Thu Jul 19 15:28:01 EDT 2007


It may be another file called by one of those (or $HOME/.profile or
$HOME/.bashrc or one of the ones called by one those...)

That is to say you may be sourcing something else that is setting your
PATH variable in another file.

Or it could be another variable being set appended to the PATH for some
reason.  
e.g.  
WIERDVAR=/usr/local/bin # Just because I can
PATH=/usr/bin:/usr/sbin:$WIERDVAR

You might try putting debug in each of the files then stepping through
(executing) them at command line to see what they tell you.   

I recall once I inherited a setup where the /etc/profile executed the
.profile which then executed some environment set script which in turn
executed another script that set some variables which in turn executed
something else.  Trying to find what had set a specific variable was
maddening.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
To: ale at ale.org
Jeffrey B. Layton
Sent: Thursday, July 19, 2007 3:02 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] bash path problems

Sorry. I should have given more information that this is the
"easy" solution. I'm trying to find in /etc/bashrc and /etc/profile
where it adds /usr/local/bin to PATH. I can seem to find it.
I can post them if needed. BTW - this is a CentOS 4 box.

Jeff

> In other words...
>
> ~/.bashrc:
>
>      PATH=/usr/bin:$PATH
>      export $PATH
>
> On 7/19/07, Jeff Lightner <jlightner at water.com> wrote:
>   
>> Are you saying you can't edit /etc/bashrc or /etc/profile?  That
would
>> seem to be the way to do it.
>>
>> Of course you can always override the default PATH from those files
by
>> doing PATH=whatever at the command line or in your $HOME/.bashrc or
>> $HOME/.profile.
>>
>> Just don't do "PATH=$PATH:whatever" as that tells it to append
whatever
>> to the END of the existing PATH meaning it will continue to use the
one
>> from /etc/bashrc or profile.
>>
>> -----Original Message-----
>> From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of
>> Jeffrey B. Layton
>> Sent: Thursday, July 19, 2007 1:22 PM
>> To: ale at ale.org
>> Subject: [ale] bash path problems
>>
>> Afternoon,
>>
>> I hate to bother everyone, but I'm having bash path
>> problems. I want /usr/bin to be before /usr/local/bin,
>> but it's always the opposite. I even moved all of .bash*
>> files to a different directory and I still get /usr/local/bin
>> before /usr/bin. So it mush be in the system files
>> (/etc/bashrc, /etc/profile). Does anyone have any
>> suggestions on how to do this? It should be easy, but
>> I'm missing it.
>>
>> TIA!
>>
>> Jeff
>>
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://www.ale.org/mailman/listinfo/ale
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://www.ale.org/mailman/listinfo/ale
>>
>>     
>
>
>   

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list