Things not staying in PATH?
I installed java to run a program and put it in the PATH.. program ran fine. When I went back later it said java command not found..
I put it in the path again.. same thing, it worked once then stopped. Im putting it the path with the following command: export PATH=/home/name/j2re1.3.1/bin:$PATH any ideas? |
you should add the export line you wrote to /etc/profile file at the end, so every user who is loged into the system will have the same chunk of it. If you'd like to keep it only to a particular user add the java bin directory to $PATH in .bash_profile file in the users home directory. Don't forget to run
source /etc/bashprofile or source .bash_profile to make changes happen immediatly. |
Im having a problem getting it in my etc/profile file.. And in my .bash_profile.
What code would I put in? |
as root open for editing /etc/profile file
i am not using GUI editors so I can't tell you wich one is better, if you work from console and not famiiar with emacs, vi or any other console editors, I found the easiest to use for a newbie is pico in console as root type pico /etc/profile It will open the file in console navigate by using arrow keys, go to the end and type export PATH=/home/name/j2re1.3.1/bin:$PATH save the file ( in pico hit ctrl-O and then ctrl-X to save and quit) then from the console as root run source /etc/profile as a non-root run the same command to make changes for non-root user who currently logged in (yourself) it will make the PATH permanent for you as root and for you as yourself on the system |
Got it working, thanks
|
No problems
|
All times are GMT -5. The time now is 04:41 PM. |