The global variable PATH is set up in /etc/profile.
What we want is to override this PATH variable's value with the new variable at the user level.
User variable configuration file is ~/.bashrc, so edit this file with your favorite editor:
at the end of the file add a line with your new variable declaration:
#my new variable
export MY_NEW_EXECUTABLE_HOME_DIR=/home/user/libs/myNewLib
then override the globally declared PATH variable like this:
export PATH="${PATH}:$MY_NEW_EXECUTABLE_HOME_DIR/bin"
Aucun commentaire:
Enregistrer un commentaire