1752785 Members
6182 Online
108789 Solutions
New Discussion юеВ

adding PATH

 
SOLVED
Go to solution
nipun_2
Regular Advisor

adding PATH

Hi,
I am new to linux/unix environment. I have couple of softwares installed in
home/opt/SOFTWARE folder

I need to include the search path so that I don't need to go the above directory to start the application

i see PATH varialbe but I don't know how to modify to include the above path

Thanks in advance

Nipun
3 REPLIES 3
Ivan Ferreira
Honored Contributor
Solution

Re: adding PATH

If you want to do it for your user only, edit the .bash_profile file, for all users, edit the /etc/profile.

Add a line like this:

PATH=$PATH:/path/to/SOFTWARE


Where /path/to/SOFTWARE is the full path to the directory you want to add, I don't know if your posted path is right, but if it is, then should be:

PATH=$PATH:/home/opt/SOFTWARE
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
nipun_2
Regular Advisor

Re: adding PATH

Hi Ivan,
Thanks for the reply.
My path is
/opt/mathematica/bin/"exectuables"

so I edited the .bash_profile as follows

PATH = $PATH:/opt/mathematica/bin/
export PATH

however when I login to the system and type the name of the executables - math or mathematica or Mathematica it always gives "command not found"

I also give echo $PATH but it does not show the above changes

nipun_2
Regular Advisor

Re: adding PATH

I had a problem with a script line before the PATH variable. When I removed that line I was able to modify the PATH variable

Thanks for your help

Nipun