Which file(s) assigns the preset Environment variables listed by bash
printenv
or env
on Lubuntu (LXQt & LXDE, if they are different)?
Are the same files used for other:
- Debian-based distros
- Non-Debian distros (Red Hat family, Arch)
TIA!
Which file(s) assigns the preset Environment variables listed by bash
printenv
or env
on Lubuntu (LXQt & LXDE, if they are different)?
Are the same files used for other:
TIA!
most of them are defined in relevant files in the /etc
directory. running grep -r ^[[:upper:]] /etc/*
must list most of them.
a few particularly interesting files according to the Ubuntu documentation are:
/etc/environment
: documentation states
"...This file is specifically meant for system-wide environment variable
settings. It is not a script file, but rather consists of assignment
expressions, one per line..."
/etc/profile.d
directory ending in .sh
. documentation states:
"...An alternative is to create a file for the purpose in the
/etc/profile.d directory... Files with the .sh extension in the
/etc/profile.d directory get executed whenever a bash login shell is
entered (e.g. when logging in from the console or over ssh), as well
as by the DisplayManager when the desktop session loads..."