[vox-tech] PATH Changing

jjstickel at vcn.com jjstickel at vcn.com
Thu Jun 17 06:55:40 PDT 2010


Quoting "Anahita Yazdi" <atyazdi at ucdavis.edu>:

> Hi again,
>
> I have been trying to change the PATH on two computers: one is mac osx and
> the other one is Linux (Ubuntu 10.04) But I faced several problems and
> basically I have the following questions:
>
> I changed the PATH on terminal on the Linux using "set PATH" command and I
> accidentally changed it to a wrong one. How would I be able to undo PATH
> basically? what is the command for it? Because the "set" command just adds
> to the PATH without letting me change it.
>
> My other question is regarding changing the PATH permanently in bash shell
> for mac. When I change the PATH on the terminal, I realize it doesnt
> permanently change it. I realized the PATH I have in X11 terminal is
> different from the one on regular terminal. and once I close terminal page
> and reopen it again the PATH is gone back to its original form. How can a
> PATH be changed permanently on both terminals?
>
> Lastly a weird solid gray color screen pops on the background when I open up
> X11 terminal which the only way to get rid of it is keying "control Q". Does
> anyone by any chance had this problem before? Or knows why would this
> happen?
>
> I will really be appreciated if anyone would be able to help me with these
> issues. Thank you so much in advance,
> Anahita
>

Setting your PATH to be what you want when you start a new terminal  
works similarly in most Linux distributions and on Mac OS X.   
Sometimes odd behaviors can be worked out by trial and error.  In your  
home directory, there may already be a .profile or .bash_profile.  If  
neither exist, create an empty text file named .bash_profile.  In that  
file you can specify your path, like this:

export PATH=/new/path/to/add:$PATH

where $PATH specifies to keep what already is in the path still in the path.

Sometimes, a .bash_profile may already exist that will contain lines  
to call ~/.bashrc.  If this is the case, then some systems expect you  
to make your personal entries in .bashrc rather than in .bash_profile.

HTH,
Jonathan



More information about the vox-tech mailing list