UPDATE: from here

Note that ~/.bash_rc is not read by any program, and ~/.bashrc is the configuration file of interactive instances of bash. You should not define environment variables in ~/.bashrc. The right place to define environment variables such as PATH is ~/.profile (or ~/.bash_profile if you don’t care about shells other than bash). 

Just type the the following command in the terminal ant it will work temporarily

export PATH=$PATH:</path/to/file>

So if I have a program called a.out located in /home/user/Desktop/MyProgram/, I would type:

export PATH=$PATH:home/user/Desktop/MyProgram/

To make it permanent, add the same line to the file ~/.bashrc .