ENVIRONMENT.D(5) environment.d ENVIRONMENT.D(5) (NAME) environment.d - (SYNOPSIS) ~/.config/environment.d/*.conf /etc/environment.d/*.conf /run/environment.d/*.conf /usr/local/lib/environment.d/*.conf /usr/lib/environment.d/*.conf /etc/environment (DESCRIPTION) environment.d/ systemd . systemd-environment-d-generator(8) systemd . . ~/.config/environment.d/ . $XDG_CONFIG_HOME ( PAM /etc/environment) ~/.config/ . (bootstrapping) : environment.d/ $XDG_CONFIG_HOME . . (symlink) /etc/environment . (CONFIGURATION DIRECTORIES AND PRECEDENCE) /etc/ /run/ /usr/local/lib/ /usr/lib/ . ".conf" . /etc/ /run/ /usr/local/lib/ /usr/lib/ . /run/ /usr/ . (lexicographic) . . ( ) ( ). /usr/lib/ ( ) /usr/local/lib/ ( ) [1] . /etc/ (override) . . 10-40 /usr/ 60-90 /etc/ /run/ . (symlink) /dev/null /etc/ . initrd . (CONFIGURATION FORMAT) "KEY=VALUE" . "${OTHER_KEY}" "$OTHER_KEY" . "${FOO:-DEFAULT_VALUE}" "${FOO}" DEFAULT_VALUE "${FOO:+ALTERNATE_VALUE}" ALTERNATE_VALUE "${FOO}" . "$" "$$". "\" ( ) (literal) . / . ' ' " " . """ "$" "\" "`" . . . . KEY . "#" ";" . . (EXAMPLES) 1. /opt/foo /etc/environment.d/60-foo.conf: FOO_DEBUG=force-software-gl,log-verbose PATH=/opt/foo/bin:$PATH LD_LIBRARY_PATH=/opt/foo/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} XDG_DATA_DIRS=/opt/foo/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} 2. /etc/environment.d/70-bar.conf: # A comment test_var=(variable) ; Another comment test_comment=value # This is a part of the variable, and not a comment! test_none= \ before\ after "" '' \${test_var} test_double=" \ before\ after "" '' \${test_var}" test_single=' \ before\ after "" '' \${test_var}' # The above example produces the following environment variables, written using # C-style string escapes: # # test_var="(variable)" # test_comment="value # This is a part of the variable, and not a comment!" # test_none=" beforeafter \"\" '' (variable)" # test_double=" \\ beforeafter '' (variable)" # test_single=" \\ before\\\nafter \"\" \\(variable)" (APPLICABILITY) ( systemd --user user@uid.service) . . GNOME gnome-terminal-server.service . . : systemd.service(5) systemd systemd.scope(5) . . . PAM. ssh sshd(8) sshd ssh(1) . . systemd systemctl show-environment D-Bus . (SEE ALSO) systemd(1), systemd-environment-d-generator(8), systemd.environment- generator(7) (NOTES) 1. . /usr/local/ . systemd 261.2 ENVIRONMENT.D(5)