On Aug 7, 2007, at 11:02 AM, Manon Metten wrote:
They do the same thing, but for different scopes. /etc/profile affects every account on the system. ~/.bash_profile only affects your own.
On a single-user machine the distinction is meaningless, but on a multi-user system it's important. Software installed publicly for everyone goes in the PATH set in /etc/profile, software installed in an individual person's home directory goes in the PATH set in ~/.bash_profile. It's good to get in the habit of thinking about these distinctions, because some day you might be administering a machine that's used by other people.
Generally unless you have a specific reason to put something there, you want to leave /etc/profile alone.