0

I note that if I have several terminal windows opened and in one of them I set path variable through bashrc:

export APP_PATH="path_to_app"    
export PATH="$APP_PATH:$PATH"

Then call:

source ~/.bashrc

Then new path is visible only in that window where I did it. Why? How can I make it visible to others?

More of that if I call source several times all of the path entries are duplicated. Again why? I thought source just reloads all information for bashrc.

1 Answer 1

1

When you call source ~/.bashrc you reload your ~/.bashrc configuration only for that current terminal session. You have to do it for all other existing terminal sessions as well if you want to reload your ~/.bashrc

2
  • And what about the whole system?
    – Long Smith
    Apr 22, 2016 at 11:27
  • If you open a new terminal it will read from the ~/.bashrc configuration file. Do mind that bashrc is a user dependet file. If you for example open up a terminal as root you will load your bashrc from /root/.bashrc. Apr 22, 2016 at 11:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .