Linux /etc/bash.bashrc versus /etc/profile

The most common place that people add system-wide environment variables on Linux is in /etc/profile. However, this requires that you log out and back in again (or start another session) for these changes to take effect. Whilst this is acceptable practise for most Linux desktop developers, I find it a little tedious when working from the Linux command-line.

So, after a little probing, I discovered that you can also make system-wide changes in /etc/bash.bashrc file but can use these immediately by simply invoking a new bash session (by typing bash at the same command prompt).

Of course if you have desktop applications that require the new settings then you will still have to log out and back in again as before but, if like me, you work a lot from the command-line, then you have the added benefit of being able to use the new settings immediately.