Hi @hamza.pdn,
Thank you for question it’s an interested one.
On linux to run a script you need to be on the folder where the bash script is, but it’s possible to run a script anywhere on the system for that the path to the script need to be on the $PATH environment variable.
On this example we only have /user/local/bin, /user/local/sbin,/usr/bin,/usr/sbin,/sbin,/bin
that mean only script on the folder can be run from anywhere.
this is why obs-studio
can be run and return command not found
because he’s not inside on one the below path, he’s inside /opt/obs/bin
.
To fix this issue, he add /opt/obs/bin
to $PATH
environment variable using EXPORT
command by added the new path to $PATH
: export PATH=$PATH:/opt/obs/bin
.
EXPORT
is the command to assign - re-assign an environment variable.
http://www.linfo.org/path_env_var.html
PS : if you use export the path only work on the terminal you run it, and will no longer work when you close it or restart your session. To make it permanent, you need to your profile file.