1SYSTEMD.SYNTAX(7) systemd.syntax SYSTEMD.SYNTAX(7)
2
3
4
6 systemd.syntax - General syntax of systemd configuration files
7
9 This page describes the basic principles of configuration files used by
10 systemd(1) and related programs for:
11
12 · systemd unit files, see systemd.unit(5), systemd.service(5),
13 systemd.socket(5), systemd.device(5), systemd.mount(5),
14 systemd.automount(5), systemd.swap(5), systemd.target(5),
15 systemd.path(5), systemd.timer(5), systemd.slice(5),
16 systemd.scope(5)
17
18 · daemon config files, see systemd-system.conf(5), systemd-
19 user.conf(5), logind.conf(5), journald.conf(5), journal-
20 remote.conf(5), journal-upload.conf(5), systemd-sleep.conf(5),
21 timesyncd.conf(5)
22
23 The syntax is inspired by XDG Desktop Entry Specification[1] .desktop
24 files, which are in turn inspired by Microsoft Windows .ini files.
25
26 Each file is a plain text file divided into sections, with
27 configuration entries in the style key=value. Empty lines and lines
28 starting with "#" or ";" are ignored, which may be used for commenting.
29
30 Lines ending in a backslash are concatenated with the following line
31 while reading and the backslash is replaced by a space character. This
32 may be used to wrap long lines. The limit on line length is very large
33 (currently 1 MB), but it is recommended to avoid such long lines and
34 use multiple directives, variable substitution, or other mechanism as
35 appropriate for the given file type.
36
37 Example 1.
38
39 [Section A]
40 KeyOne=value 1
41 KeyTwo=value 2
42
43 # a comment
44
45 [Section B]
46 Setting="something" "some thing" "..."
47 KeyTwo=value 2 \
48 value 2 continued
49
50 Various settings are allowed to be specified more than once, in which
51 case the interpretation depends on the setting. Often, multiple
52 settings form a list, and setting to an empty value "resets", which
53 means that previous assignments are ignored. When this is allowed, it
54 is mentioned in the description of the setting. Note that using
55 multiple assignments to the same value makes the file incompatible with
56 parsers for the XDG .desktop file format.
57
59 1. XDG Desktop Entry Specification
60 http://standards.freedesktop.org/desktop-entry-spec/latest/
61
62
63
64systemd 239 SYSTEMD.SYNTAX(7)