What's the preferred way to set environment variables for all users (on Ubuntu) such that the new variables are read whenever a new shell/terminal is started? Presently, we're using a file in /etc/profile.d/
but
- Changes aren't picked up when a user opens a new shell, and
- Only programs started through a login shell (e.g., we have to set terminals to run
/bin/bash -l
instead of/bin/bash
) actually read this file.
I guess one could demand a source
line in all users' .bashrc
s, but is there a way to keep everything in /etc
?