File: systemd.syntax.7

package info (click to toggle)
manpages-de 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 71,404 kB
  • sloc: sh: 1,059; makefile: 71; python: 64; perl: 37; sed: 11
file content (154 lines) | stat: -rw-r--r-- 4,657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
'\" t
.TH "SYSTEMD\&.SYNTAX" "7" "" "systemd 241" "systemd.syntax"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
systemd.syntax \- General syntax of systemd configuration files
.SH "INTRODUCTION"
.PP
This page describes the basic principles of configuration files used by
\fBsystemd\fR(1)
and related programs for:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
systemd unit files, see
\fBsystemd.unit\fR(5),
\fBsystemd.service\fR(5),
\fBsystemd.socket\fR(5),
\fBsystemd.device\fR(5),
\fBsystemd.mount\fR(5),
\fBsystemd.automount\fR(5),
\fBsystemd.swap\fR(5),
\fBsystemd.target\fR(5),
\fBsystemd.path\fR(5),
\fBsystemd.timer\fR(5),
\fBsystemd.slice\fR(5),
\fBsystemd.scope\fR(5)
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
daemon config files, see
\fBsystemd-system.conf\fR(5),
\fBsystemd-user.conf\fR(5),
\fBlogind.conf\fR(5),
\fBjournald.conf\fR(5),
\fBjournal-remote.conf\fR(5),
\fBjournal-upload.conf\fR(5),
\fBsystemd-sleep.conf\fR(5),
\fBtimesyncd.conf\fR(5)
.RE
.PP
The syntax is inspired by
\m[blue]\fBXDG Desktop Entry Specification\fR\m[]\&\s-2\u[1]\d\s+2
\&.desktop
files, which are in turn inspired by Microsoft Windows
\&.ini
files\&.
.PP
Each file is a plain text file divided into sections, with configuration entries in the style
\fIkey\fR=\fIvalue\fR\&. Empty lines and lines starting with
"#"
or
";"
are ignored, which may be used for commenting\&.
.PP
Lines ending in a backslash are concatenated with the following line while reading and the backslash is replaced by a space character\&. This may be used to wrap long lines\&. The limit on line length is very large (currently 1 MB), but it is recommended to avoid such long lines and use multiple directives, variable substitution, or other mechanism as appropriate for the given file type\&. When a comment line or lines follow a line ending with a backslash, the comment block is ignored, so the continued line is concatenated with whatever follows the comment block\&.
.PP
\fBExample\ \&1.\ \&\fR
.sp
.if n \{\
.RS 4
.\}
.nf
[Section A]
KeyOne=value 1
KeyTwo=value 2

# a comment

[Section B]
Setting="something" "some thing" "\&..."
KeyTwo=value 2 \e
       value 2 continued

[Section C]
KeyThree=value 2\e
# this line is ignored
; this line is ignored too
       value 2 continued
.fi
.if n \{\
.RE
.\}
.PP
Boolean arguments used in configuration files can be written in various formats\&. For positive settings the strings
\fB1\fR,
\fByes\fR,
\fBtrue\fR
and
\fBon\fR
are equivalent\&. For negative settings, the strings
\fB0\fR,
\fBno\fR,
\fBfalse\fR
and
\fBoff\fR
are equivalent\&.
.PP
Time span values encoded in configuration files can be written in various formats\&. A stand\-alone number specifies a time in seconds\&. If suffixed with a time unit, the unit is honored\&. A concatenation of multiple values with units is supported, in which case the values are added up\&. Example:
"50"
refers to 50 seconds;
"2min\ \&200ms"
refers to 2 minutes and 200 milliseconds, i\&.e\&. 120200\ \&ms\&. The following time units are understood:
"s",
"min",
"h",
"d",
"w",
"ms",
"us"\&. For details see
\fBsystemd.time\fR(7)\&.
.PP
Various settings are allowed to be specified more than once, in which case the interpretation depends on the setting\&. Often, multiple settings form a list, and setting to an empty value "resets", which means that previous assignments are ignored\&. When this is allowed, it is mentioned in the description of the setting\&. Note that using multiple assignments to the same value makes the file incompatible with parsers for the XDG
\&.desktop
file format\&.
.SH "SEE ALSO"
.PP
\fBsystemd.time\fR(7)
.SH "NOTES"
.IP " 1." 4
XDG Desktop Entry Specification
.RS 4
\%http://standards.freedesktop.org/desktop-entry-spec/latest/
.RE