|
|
|
|
|
by dghubble
4710 days ago
|
|
~/.profile is executed only at login on Ubuntu so changing your PATH there will be applied the next time you login. You can source the ~/.profile in your current non-login shell if you need the PATH change right now. I've tried to tweak the second paragraph in the "When not to modify .bashrc?" section to make this more clear. Thanks for bringing this up. |
|
Sure, you could source .profile manually, but this is awkward to code inside an MPI application. In addition, this will cause .bashrc to get sourced twice, because your shell already read .bashrc when it started the SSH session. Hopefully your .bashrc is idempotent, but even so, it feels wrong to have to read .bashrc twice.
Try this on a remote server:
And then from your local machine: