# path variable



## shadowfax (Jul 24, 2003)

Hi,

  I have downloaded rar and stored under /application

and I was wondering how can I set a path variable where I can invoke rar anywhere, and I am using bash if that makes a difference.  Thank you!


----------



## slur (Jul 25, 2003)

I believe that ~/bin is already part of the shell path. If you put rar in a folder called bin in your home directory then it will be found by the shell. (You may have to run the "rehash" command if the terminal is already open, although I don't think this command exists in bash.)

I don't recommend dropping a bunch of unix binaries into your Applications folder. It's not really the appropriate place for them. /usr/local/bin or ~/bin is a wiser choice.

That said, you can add other directories to your $path by adding a command like the following to a file called .bashrc in your home directory:

*export PATH=/Applications:$PATH*


----------



## shadowfax (Jul 25, 2003)

Thanks for your help.


----------



## btoneill (Jul 28, 2003)

Create a .bashrc file in your home directory, in that file put:
PATH=$PATH:/path/you/want/to/add
export PATH

That will add in /path/you/want/to/add to the search path. If the rar app is sitting in /Applications, add in:
PATH=$PATH:/Applications
export PATH


Brian


----------

