[SOLVED] Add folder to $PATH

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
User avatar
Mr. Blue
Level 2
Level 2
Posts: 69
Joined: Sun Jul 13, 2008 9:25 pm

[SOLVED] Add folder to $PATH

Postby Mr. Blue » Sat Jul 19, 2008 3:25 pm

Hi there,

I'm aware that, for a single session, I can add a folder to my $PATH by using:

Code: Select all

PATH=$PATH:/scripts
export PATH


But I think to have it persist across a reboot it needs to be in my .bash_profile. Mint only has .bash_history, .bash_logout and .bashrc_vanilla(.default).

Would I add it to .bashrc_vanilla or must it go somewhere else?

Thanks.
Last edited by Mr. Blue on Sun Jul 20, 2008 4:57 pm, edited 1 time in total.
...and that should work...theoretically.

Husse
Level 23
Level 23
Posts: 19594
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Add folder to $PATH

Postby Husse » Sun Jul 20, 2008 8:18 am

I was thinking of the same (almost) as I want to change the locale for date
With Elyssa there was a change and this was moved entirely (?) to /etc
I'll have to check what is the correct procedure now
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

User avatar
wickedlester
Level 1
Level 1
Posts: 8
Joined: Sat Nov 17, 2007 11:00 pm

Re: Add folder to $PATH

Postby wickedlester » Sun Jul 20, 2008 9:20 am

You can create a .bashrc file and add it there.
Image

Husse
Level 23
Level 23
Posts: 19594
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Add folder to $PATH

Postby Husse » Sun Jul 20, 2008 10:05 am

Yes - but I did that to fix my locale problem and it did not change anything...
Image
Don't fix it if it ain't broken, don't break it if you can't fix it

User avatar
wickedlester
Level 1
Level 1
Posts: 8
Joined: Sat Nov 17, 2007 11:00 pm

Re: Add folder to $PATH

Postby wickedlester » Sun Jul 20, 2008 10:21 am

Not sure about the locale setting, but I have all my alias's, added paths, etc in my .bashrc and they are all recognized and work. Looks like the system wide bash file is /etc/bash.bashrc which is sourced from /etc/profile. changes could be made here and they would be system wide but it would be better to make personal changes in the ~ directory. I think that if one is running bash as a login shell, that ~/.bashrc should automatically be sourced but I may be wrong.
Image

User avatar
Mr. Blue
Level 2
Level 2
Posts: 69
Joined: Sun Jul 13, 2008 9:25 pm

Re: Add folder to $PATH

Postby Mr. Blue » Sun Jul 20, 2008 4:57 pm

Worked great.

Created ~/.bashrc, added this:

Code: Select all

PATH=$PATH:/home/<username>/Documents/scripts


Reopened the terminal and all the scripts were available.

Thanks.
...and that should work...theoretically.

Husse
Level 23
Level 23
Posts: 19594
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Add folder to $PATH

Postby Husse » Sun Jul 20, 2008 4:58 pm

This is much more complicated (the time/date thing) that I thought
Sorry for the detour - I'm getting gray hairs over my failure to get Tbird show dates the right way
Image
Don't fix it if it ain't broken, don't break it if you can't fix it


Return to “Newbie Questions”

Who is online

Users browsing this forum: Moem and 22 guests