[LBo] Re: PATH

Eric Archer ericarcher at aol.com
Wed Nov 8 03:44:32 CET 2006


James Allen wrote:
>> If your $PATH is lost in BASH, how do you restore the default one
>> (without exiting the shell)?
>>
>> Jisao
> 
> source /etc/profile
> 
> James
I am obviously new to linux and and trying to understand this. Also,I am
either the only that can't get this to work or the only one trying it.
I know you can logout and back in to reset the PATH.
What am I doing wrong?
Thanks very much.

ericarcher at linux:~> bash --version
GNU bash, version 3.1.17(1)-release (i586-suse-linux)
Copyright (C) 2005 Free Software Foundation, Inc.
ericarcher at linux:~> echo $PATH
/home/ericarcher/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin

:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
ericarcher at linux:~> export PATH=blah
ericarcher at linux:~> echo $PATH
blah
ericarcher at linux:~> source /etc/profile
bash: dircolors: command not found
bash: grep: command not found
bash: grep: command not found
ericarcher at linux:~> echo $PATH
blah
ericarcher at linux:~> source /home/ericarcher/.bash_profile
bash: /home/ericarcher/.bash_profile: No such file or directory
ericarcher at linux:~> source /home/ericarcher/.bashrc
ericarcher at linux:~> echo $PATH
blah
ericarcher at linux:~> source /home/ericarcher/.profile
ericarcher at linux:~> echo $PATH
blah
ericarcher at linux:~> source /etc/bash.bashrc
bash: dircolors: command not found
bash: grep: command not found
bash: grep: command not found
ericarcher at linux:~> echo $PATH
blah
ericarcher at linux:~>



More information about the QnA mailing list