[systemd-devel] [PATCH] man: Add a note about what environment variables are available by default.

Colin Guthrie colin at mageia.org
Fri Jul 26 02:21:47 PDT 2013


This question was asked by a user trying to debug a problem with Java services
which required JAVA_HOME to be set.
---
 man/systemd.exec.xml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/man/systemd.exec.xml b/man/systemd.exec.xml
index c0e1d86..b78f255 100644
--- a/man/systemd.exec.xml
+++ b/man/systemd.exec.xml
@@ -77,6 +77,13 @@
                 configuration options are configured in the [Service],
                 [Socket], [Mount], or [Swap] sections, depending on the unit
                 type.</para>
+
+                <para>All processes are executed in a clean environment in
+                which only the TERM, PATH, USER, and HOME variables are set
+                by default. In order to set additional variables, see the
+                Environment= and EnvironmentFile= options below. To specify
+                variables globally, you can configure DefaultEnvironment= in
+                <citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
         </refsect1>
 
         <refsect1>
-- 
1.8.3.4



More information about the systemd-devel mailing list