Linux Paths
Post # 43 permalink Topic #43 by mreschke on 2008-04-15 16:52:39 (viewed 278 times)

Paths are the locations for executables which can be accessed from any location.

To view current paths[-][- -][++]

Code Snippet
# echo $PATH

To add to the path (lost upon restart or shutdown)[-][- -][++]

Code Snippet
# PATH=$PATH:/dir/dir1

Example[-][- -][++]

Code Snippet
I downloaded UNace (an .ace acrhive extractor)
I copied the unace folder to /usr/bin/
I added a path:
# PATH=$PATH:/usr/bin/unace

now I can type unace anywhere, and it finds it from the path

To Add a path permenantly (loads at startup)[-][- -][++]

To edit a path for a user open $HOME/.bash_profile or to edit for all users edit /etc/profile
In either file you will see: PATH=$PATH:$HOME/bin, just add paths to that, separate paths by a :

Code Snippet
PATH:$PATH:$HOME/bin:/usr/bin/unace