Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My machine is running Fedora 16 x86_64

I am trying to figure out why I can not get my GUI terminal window to refresh the path.

I recently added a new location to the path (in .bash_profile), after closing the GUI terminal and reopening it, the new location is still not showing. When I go to tty2 the new path is listed. I closed the GUI terminal and reopened again to find the new path entry still is not in the path being used. I did not reboot but I am trying to:

  1. avoid rebooting
  2. figure out what I need to do so that I do not run into this problem again
share|improve this question
add comment

1 Answer

The shell profile - for bash, ~/.bash_profile - is only loaded when you start a login shell. A non-login shell uses ~/.bashrc.

At a guess your terminal is starting a non-login shell for a new tab or window, which means that your change won't be seen until you log off and back on again.

You might consider setting your path in .bashrc, or you might set your terminal program to start login shells instead. (I generally prefer the later, but YMMV)

share|improve this answer
2  
Also, and ad-hoc solution is just source ~/.bash_profile to make it happen right now. And I agree with Daniel, the problem is that you have to logout and login in X in order to apply the settings from your profile. –  Patkos Csaba Feb 4 '12 at 11:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.