LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Removing path form PATH (https://www.linuxquestions.org/questions/linux-newbie-8/removing-path-form-path-289360/)

maginotjr 02-12-2005 12:44 PM

Removing path from PATH
 
okay, I know how to export a new path. But how can I remove it?

I have set a wrong Path direction on my $PATH, and now I want to change it... I have searched for the bashrc, bash_profile, profile, and the only PATH I found was in the profile file but is for the root user....

Im using Debian (Sarge)...
Im new on Debian... so I dont know where my path is

reg [ ]s ! :D

Linux~Powered 02-12-2005 01:09 PM

Look in /etc/profile

slakmagik 02-12-2005 01:32 PM

Do you mean you personally set it wrong on the fly? If you simply issued a command changing your path that isn't permanent and you only need to exit the xterm (or logout entirely and log back in again if you're on a text console). Or, more directly, simply 'echo $PATH' and type 'export PATH=' and copy and edit the results of the previous command. (You can append a path with '$PATH:newpath' but removing a path can't be so easily done, so far as I know. Maybe 'export PATH=`echo $PATH | sed 's,/bad/path\:,,'`.)

But, yeah, if it's in a config file, it'll take effect for every shell (basically), and it'd be in /etc/profile or the like and then on to your ~/.bash* files and a ~/.profile if you have one.

maginotjr 02-12-2005 02:23 PM

thanks for the info!

Was on the fly, and like you said after close the term the Path was set back.
Now i understand more about this


JRE is the same Java Virtual Machine? O_o


[ ]ś


All times are GMT -5. The time now is 03:20 AM.