How to add path of a program to $PATH environment variable?
How to add a directory to my path?
I need to use a program in my job. I followed the installation instructions of this PROGRAM. However, when I try to run it the message appears -
program_that_I_want_to_run:Command not found
I know that it is a
$PATHproblem, but I tried the command line described in the instructions and it did not work.
Set environment variable CONFIG_PATH
I am sure that I indicated correctly the path to access the
configdirectory. No typing errors.
Is it really necessary to obscificate your question ? It would be much easier to help you if you specified your program, how you installed it, and what the full path was. I am not sure if you need `export CONFIG_PATH=/my_path_to_PROGRAM/PROGRAM/config/` as your error message is one of PATH and not necessarily configuration, hard to know from what little you posted.
Firstly, check your original path:
It should show something like this:
Now add your program to that path, ensuring your using the entire path all the way from / to your program.
This sets your PATH variable to the existing PATH plus what you add to the end. Check that it has been added (Caveat: it presist only in the current session of the terminal):
no this is not permanent, as i closed the terminal, reopen it and type 'echo $PATH'.. it didn't show me my new path in it.
Add this line to ~/.bashrc (you use PATH rather then CONFIG_PATH)
export PATH=$PATH:/path/to_directory_containing_program export CONFIG_PATH=/my_path_to_PROGRAM/PROGRAM/config/
Environment variables should be set in either ~/.pam_environment or ~/.profile, not ~/.bashrc.
@galath- You do understand that this question is both a duplicate and over 3 years old ? The link you give is more recent then the original question.