How to Add A Directory to $PATH in Linux

preview_player
Показать описание
For temporary user, run command in terminal:

export PATH=/Path/To/Folder:$PATH

For permanent, either edit "/etc/profile" for global or:

one of "~/.bash_profile", "~/.bash_login", "~/.profile" that exist in your Linux.

or "~/.bashrc" that works in most Linux..

And use 'if' statement for choice to avoid 'No such file or directory':

if [ -d "/Path/To/Folder" ] ; then
PATH="Path/To/Folder:$PATH"
fi

Рекомендации по теме
join shbcf.ru