1SYSTEMD.SYNTAX(7)               systemd.syntax               SYSTEMD.SYNTAX(7)
2
3
4

NAME

6       systemd.syntax - General syntax of systemd configuration files
7

INTRODUCTION

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. When a comment line or lines
36       follow a line ending with a backslash, the comment block is ignored, so
37       the continued line is concatenated with whatever follows the comment
38       block.
39
40       Example 1.
41
42           [Section A]
43           KeyOne=value 1
44           KeyTwo=value 2
45
46           # a comment
47
48           [Section B]
49           Setting="something" "some thing" "..."
50           KeyTwo=value 2 \
51                  value 2 continued
52
53           [Section C]
54           KeyThree=value 2\
55           # this line is ignored
56           ; this line is ignored too
57                  value 2 continued
58
59       Boolean arguments used in configuration files can be written in various
60       formats. For positive settings the strings 1, yes, true and on are
61       equivalent. For negative settings, the strings 0, no, false and off are
62       equivalent.
63
64       Time span values encoded in configuration files can be written in
65       various formats. A stand-alone number specifies a time in seconds. If
66       suffixed with a time unit, the unit is honored. A concatenation of
67       multiple values with units is supported, in which case the values are
68       added up. Example: "50" refers to 50 seconds; "2min 200ms" refers to 2
69       minutes and 200 milliseconds, i.e. 120200 ms. The following time units
70       are understood: "s", "min", "h", "d", "w", "ms", "us". For details see
71       systemd.time(7).
72
73       Various settings are allowed to be specified more than once, in which
74       case the interpretation depends on the setting. Often, multiple
75       settings form a list, and setting to an empty value "resets", which
76       means that previous assignments are ignored. When this is allowed, it
77       is mentioned in the description of the setting. Note that using
78       multiple assignments to the same value makes the file incompatible with
79       parsers for the XDG .desktop file format.
80

SEE ALSO

82       systemd.time(7)
83

NOTES

85        1. XDG Desktop Entry Specification
86           http://standards.freedesktop.org/desktop-entry-spec/latest/
87
88
89
90systemd 241                                                  SYSTEMD.SYNTAX(7)
Impressum