219 lines
6.3 KiB
HTML
219 lines
6.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SYSTEMD.SYNTAX</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SYSTEMD.SYNTAX</H1>
|
|
Section: systemd.syntax (7)<BR>Updated: <BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
systemd.syntax - General syntax of systemd configuration files
|
|
<A NAME="lbAC"> </A>
|
|
<H2>INTRODUCTION</H2>
|
|
|
|
<P>
|
|
|
|
This page describes the basic principles of configuration files used by
|
|
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1)
|
|
and related programs for:
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
•
|
|
|
|
|
|
systemd unit files, see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.unit">systemd.unit</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.service">systemd.service</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.socket">systemd.socket</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.device">systemd.device</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.mount">systemd.mount</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.automount">systemd.automount</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.swap">systemd.swap</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.target">systemd.target</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.path">systemd.path</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.timer">systemd.timer</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.slice">systemd.slice</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.scope">systemd.scope</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.nspawn">systemd.nspawn</A></B>(5)
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
•
|
|
|
|
|
|
link files, see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.link">systemd.link</A></B>(5)
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
•
|
|
|
|
|
|
netdev and network files, see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.netdev">systemd.netdev</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd.network">systemd.network</A></B>(5)
|
|
</DL>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
•
|
|
|
|
|
|
daemon config files, see
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd-system.conf">systemd-system.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd-user.conf">systemd-user.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+logind.conf">logind.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+journald.conf">journald.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+journal-remote.conf">journal-remote.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+journal-upload.conf">journal-upload.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+systemd-sleep.conf">systemd-sleep.conf</A></B>(5),
|
|
<B><A HREF="/cgi-bin/man/man2html?5+timesyncd.conf">timesyncd.conf</A></B>(5)
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
The syntax is inspired by
|
|
m[blue]<B>XDG Desktop Entry Specification</B>m[]<FONT SIZE="-2">[1]</FONT>
|
|
.desktop
|
|
files, which are in turn inspired by Microsoft Windows
|
|
.ini
|
|
files.
|
|
<P>
|
|
|
|
Each file is a plain text file divided into sections, with configuration entries in the style
|
|
<I>key</I>=<I>value</I>. Whitespace immediately before or after the
|
|
"="
|
|
is ignored. Empty lines and lines starting with
|
|
"#"
|
|
or
|
|
";"
|
|
are ignored, which may be used for commenting.
|
|
<P>
|
|
|
|
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.
|
|
<P>
|
|
|
|
<B>Example 1. </B>
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
[Section A]
|
|
KeyOne=value 1
|
|
KeyTwo=value 2
|
|
|
|
# a comment
|
|
|
|
[Section B]
|
|
Setting="something" "some thing" "..."
|
|
KeyTwo=value 2 \
|
|
value 2 continued
|
|
|
|
[Section C]
|
|
KeyThree=value 2\
|
|
# this line is ignored
|
|
; this line is ignored too
|
|
value 2 continued
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Boolean arguments used in configuration files can be written in various formats. For positive settings the strings
|
|
<B>1</B>,
|
|
<B>yes</B>,
|
|
<B>true</B>
|
|
and
|
|
<B>on</B>
|
|
are equivalent. For negative settings, the strings
|
|
<B>0</B>,
|
|
<B>no</B>,
|
|
<B>false</B>
|
|
and
|
|
<B>off</B>
|
|
are equivalent.
|
|
<P>
|
|
|
|
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
|
|
<B><A HREF="/cgi-bin/man/man2html?7+systemd.time">systemd.time</A></B>(7).
|
|
<P>
|
|
|
|
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.
|
|
<A NAME="lbAD"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+systemd.time">systemd.time</A></B>(7)
|
|
<A NAME="lbAE"> </A>
|
|
<H2>NOTES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="6"> 1.<DD>
|
|
XDG Desktop Entry Specification
|
|
<DL COMPACT><DT id="7"><DD>
|
|
<A HREF="http://standards.freedesktop.org/desktop-entry-spec/latest/">http://standards.freedesktop.org/desktop-entry-spec/latest/</A>
|
|
</DL>
|
|
|
|
<P>
|
|
</DL>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="8"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="9"><A HREF="#lbAC">INTRODUCTION</A><DD>
|
|
<DT id="10"><A HREF="#lbAD">SEE ALSO</A><DD>
|
|
<DT id="11"><A HREF="#lbAE">NOTES</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:10 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|