Where to put the assignment of global environment variables
Oliver Grawert
ogra at ubuntu.com
Tue Sep 13 09:24:02 UTC 2022
hi,
Am Dienstag, dem 13.09.2022 um 07:37 +0200 schrieb Volker Wysk:
> Hi!
>
> I want to do it right. I have global variables (PATH, MANPATH,
> INFOPATH),
> which need to be extended. I've tried it in /etc/environment, but
> that
> didn't have any effect. On the web, I've found the advice to put it
> in a
> script in /etc/profile.d, but there it gets evaluated *multiple*
> times.
>
> Is that normal? Or where's the intended place for those environment
> variables?
while you would normally put them into /etc/environment, in recent
releases there is now /etc/environment.d where you can put your
variable snippets that systemd will read alongside /etc/environment on
boot.
so you do not need to edit the file itself but can just drop your
extras into the dir ...
ciao
oli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20220913/d1d66437/attachment.sig>
More information about the ubuntu-users
mailing list