3 ms·
The general way to set an environment variable is in /etc/profile or ~/.{bash_,,z}profile. PAM uses /etc/environment, and systemd would prefer to have you set
by __del__ 7y ago
The general way to set an environment variable is in /etc/profile or ~/.{bash_,,z}profile.
PAM uses /etc/environment, and systemd would prefer to have you set up default environment variables in /etc/systemd/system.conf. You can even pass them directly to Linux from your bootloader (unrecognized arguments on the kernel command line in the form foo=bar become environment variables), but the profiles are the generally accepted way of doing it.
- acqq 7y agoIt is a joke? If I want to set some variable to be present for a single user (me) I surely don't want to ever touch /etc/profile or /etc/systemd/system.conf (and I have no idea what /etc/environment is supposed to be). And even less want to change something in a bootloader. The things are surely configurable in my user home directory.