Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have added a particular path to PATH and I am able to see that it has been added when I echo it, but when I echo $PATH in another window I cannot see that path I recently added. I am not sure why I am not able to see it there?

share|improve this question
up vote 0 down vote accepted

Environment variables don't escape the shell they're set in. So unless you add it to your ~/.bashrc, no other terminals will see the extra entry in $PATH

share|improve this answer
how can I add it to my ~/.bashrc? – Sam007 Nov 16 '12 at 20:48
gedit ~/.bashrc and add a line export VARIABLE-NAME=VALUE – Kevin Nov 16 '12 at 20:55
Got it thanks. and I also need to source ~/.bashrc which I was missing out – Sam007 Nov 16 '12 at 20:55
I don't think you need source ~/.bashrc, as bashrc is executed by default. – Kevin Nov 16 '12 at 20:56
Nope had to source it and it worked. Was not working without it – Sam007 Nov 16 '12 at 20:57

Your Answer


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.