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

Re: How to add dir to path



On Fri, Aug 10, 2007 at 09:04:15PM +0200, Manon Metten wrote:

> > I believe the correct way to do this is to set the path in ~/.bashrc.
> > Set it like so:
> >
> > PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:$HOME/scripts
> >
> > I've tried some of the other ways discussed in the thread, and they
> > didn't work. I hope this helps.
> 
> Thanks for your reply. I already discovered that adding it to .bash_profile
> doesn't work, but to .bashrc does. But someone told me it should belong
> in .bash_profile.
> 
> Well, I don't know, but adding it to .bashrc works and I'm glad to know
> that I'm not the only one with this 'problem'.

It works as it should on my system:

amp@think:~$ grep Hello .bash*
.bash_profile:echo "Hello from bash_profile"
.bashrc:echo "Hello from bashrc"
amp@think:~$ bash
Hello from bashrc
amp@think:~$ exit
exit
amp@think:~$ bash --login
Hello from bashrc
Hello from bash_profile
amp@think:~$


Regards,
Andrei
-- 
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

Attachment: signature.asc
Description: Digital signature


Reply to: