bash adding to path

From thelinuxwiki
Jump to: navigation, search

for ALL users - edit /etc/profile

for individual users - edit $HOME/.bash_profile:

To add a directory to the PATH just edit this line including a colon : and the new directory. For example to add: /usr/programs/bin to the PATH you would change the line to:

example:

 PATH=$PATH:$HOME/bin:/usr/programs/bin
 export PATH