Problems exporting PATH after modified.

Steven W. Orr steveo at
Mon Dec 15 15:23:08 UTC 2003

On Monday, Dec 15th 2003 at 08:39 -0500, quoth ne...:

=>On Dec 15, 2003 at 13:38, Jacques Escape in a soothing rage wrote:
=>>I'm having some problems exporting the PATH environmental variable
=>>after I have modified it in the Terminal that comes with KDE.
=>>What I do is I modify the PATH variable, and then export it. After
=>>this when I call "echo $PATH" the output displays the new modified 
=>>string. BUT as soon as I log-out and log-in again the new modified 
=>>PATH is gone and replaced by the original.
=>That is the correct behaviour. You need to add the
=>PATH statement to your shell resource config file.
=>For the bash shell use ~/.bash_profile or ~/.bashrc.

Please do *not* simply add it to the .bashrc. The proper way to do it is 
to set your PATH in a .bash_path and have that .bash_path sourced in by 
the .bash_profile. Also, you want to test your PS1 variable in your 
.bashrc to see if it has a value. If it does not you should source in your 
.bash_path. This is so that rsh/ssh commands will have a proper value for 
PATH even though the process is not a login process.

Here's the recap:


export PATH=zumzinggood:zumzingelzegood


. ~/.bash_profile


if [[ -n "$PS1" ]]
    # set some useful aliases
    # but no environment variables.
    . ~/.bash_profile

Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at

More information about the users mailing list