Comment

Comment by eslaught

> As the name implies, .bashrc is for bash configs. Environment variables or other configuration settings should typically be written to .profile on Ubuntu and .bash_profile on OS X.

I don't understand this. If I set PATH in .profile or .bash_profile, then on Ubuntu I won't see that setting when I log in via a non-login shell. This is common for non-interactive SSH sessions.

So consider the following example:

  * I install MPI to /usr/local/openmpi-X.Y.Z
  * I add /usr/local/openmpi-X.Y.Z/bin to PATH, inside my .profile
Now MPI is broken, because MPI executes out of a non-login shell when running on remote nodes via SSH.

I think I'll keep my PATH settings in .bashrc, thank you very much.

parent eslaught 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton