LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Environment variable (https://www.linuxquestions.org/questions/linux-newbie-8/environment-variable-798358/)

tarunchawla 03-27-2010 11:07 PM

Environment variable
 
I am using ubuntu 9.10,last night I changed the environment variable for newly installed java. I open /etc/environment file and write the export PATH=$PATH:/home/tarun/jdk1.6.0_18/bin
I saved it but was unable to login again.when I start the linux in recovery mode in terminal and login it shows that /usr/bin and various other paths are not included and show some eror message. When i run echo $PATH,It shows $PATH:/home/tarun/jdk1.6.0_18/bin and no other path variable.
pleasw tell me how to reset path variable to restore them into their original state using terminal,It is not accepting commands like sudo and others and only java , javac and other realted to java are running properly.

AwesomeMachine 03-27-2010 11:19 PM

export PATH='/home/user/bin:/usr/bin:/usr/local/bin:/bin'


All times are GMT -5. The time now is 04:31 PM.