mardi 1 janvier 2019

how to add a new environment variable to PATH on ARCH/Debian/Ubuntu?

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

bash script to convert all mp4 in a folder to mkv files with ffmpeg

 #!/bin/bash for i in *.mp4; do   echo "$i" "${i%%.*}.mkv"   ffmpeg -i "$i" -vcodec copy -acodec copy "${...