If I run the command
systemctl set-environment VARIABLE=VALUE
Will that be stored only in memory, or is it persisted to disk?
If I run the command
systemctl set-environment VARIABLE=VALUE
Will that be stored only in memory, or is it persisted to disk?
systemctl's {set,unset,import}-environment subcommands affect only the runtime configuration (i.e. they persist only until reboot, but will survive systemctl daemon-reexec and systemctl daemon-reload).
If you, in any case, would like to make the environment configuration permanent, you can use the DefaultEnvironment= directive in /etc/systemd/system.conf (see systemd-system.conf(5)) for system-wide environment variable configuration or Environment= (systemd.exec(5)) for per-unit configuration.