]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/systemd-sysctl.service.xml
Fix SPDX license tags
[thirdparty/systemd.git] / man / systemd-sysctl.service.xml
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!--
5 SPDX-License-Identifier: LGPL-2.1+
6 -->
7 <refentry id="systemd-sysctl.service"
8 xmlns:xi="http://www.w3.org/2001/XInclude">
9
10 <refentryinfo>
11 <title>systemd-sysctl.service</title>
12 <productname>systemd</productname>
13
14 <authorgroup>
15 <author>
16 <contrib>Developer</contrib>
17 <firstname>Lennart</firstname>
18 <surname>Poettering</surname>
19 <email>lennart@poettering.net</email>
20 </author>
21 </authorgroup>
22 </refentryinfo>
23
24 <refmeta>
25 <refentrytitle>systemd-sysctl.service</refentrytitle>
26 <manvolnum>8</manvolnum>
27 </refmeta>
28
29 <refnamediv>
30 <refname>systemd-sysctl.service</refname>
31 <refname>systemd-sysctl</refname>
32 <refpurpose>Configure kernel parameters at boot</refpurpose>
33 </refnamediv>
34
35 <refsynopsisdiv>
36 <cmdsynopsis>
37 <command>/usr/lib/systemd/systemd-sysctl</command>
38 <arg choice="opt" rep="repeat">OPTIONS</arg>
39 <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg>
40 </cmdsynopsis>
41 <para><filename>systemd-sysctl.service</filename></para>
42 </refsynopsisdiv>
43
44 <refsect1>
45 <title>Description</title>
46
47 <para><filename>systemd-sysctl.service</filename> is an early boot
48 service that configures
49 <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
50 kernel parameters by invoking <command>/usr/lib/systemd/systemd-sysctl</command>.</para>
51
52 <para>When invoked with no arguments, <command>/usr/lib/systemd/systemd-sysctl</command> applies
53 all directives from configuration files listed in
54 <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
55 If one or more filenames are passed on the command line, only the directives in these files are
56 applied.</para>
57
58 <para>In addition, <option>--prefix=</option> option may be used to limit which sysctl
59 settings are applied.</para>
60
61 <para>See
62 <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
63 for information about the configuration of sysctl settings. After sysctl configuration is
64 changed on disk, it must be written to the files in <filename>/proc/sys</filename> before it
65 takes effect. It is possible to update specific settings, or simply to reload all configuration,
66 see Examples below.</para>
67 </refsect1>
68
69 <refsect1><title>Options</title>
70 <variablelist>
71 <varlistentry id='prefix'>
72 <term><option>--prefix=</option></term>
73 <listitem>
74 <para>Only apply rules with the specified prefix.</para>
75 </listitem>
76 </varlistentry>
77
78 <xi:include href="standard-options.xml" xpointer="cat-config" />
79 <xi:include href="standard-options.xml" xpointer="no-pager" />
80 <xi:include href="standard-options.xml" xpointer="help" />
81 <xi:include href="standard-options.xml" xpointer="version" />
82
83 </variablelist>
84 </refsect1>
85
86 <refsect1>
87 <title>Examples</title>
88
89 <example>
90 <title>Reset all sysctl settings</title>
91
92 <programlisting>systemctl restart systemd-sysctl</programlisting>
93 </example>
94
95 <example>
96 <title>View coredump handler configuration</title>
97
98 <programlisting># sysctl kernel.core_pattern
99 kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I
100 </programlisting>
101 </example>
102
103 <example>
104 <title>Update coredump handler configuration</title>
105
106 <programlisting># /usr/lib/systemd/systemd-sysctl --prefix kernel.core_pattern</programlisting>
107
108 <para>This searches all the directories listed in
109 <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>
110 for configuration files and writes <filename>/proc/sys/kernel/core_pattern</filename>.</para>
111 </example>
112
113 <example>
114 <title>Update coredump handler configuration according to a specific file</title>
115
116 <programlisting># /usr/lib/systemd/systemd-sysctl 50-coredump.conf</programlisting>
117
118 <para>This applies all the settings found in <filename>50-coredump.conf</filename>.
119 Either <filename>/etc/sysctl.d/50-coredump.conf</filename>, or
120 <filename>/run/sysctl.d/50-coredump.conf</filename>, or
121 <filename>/usr/lib/sysctl.d/50-coredump.conf</filename> will be used, in the order
122 of preference.</para>
123 </example>
124
125 <para>See
126 <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
127 for various ways to directly apply sysctl settings.</para>
128 </refsect1>
129
130 <refsect1>
131 <title>See Also</title>
132 <para>
133 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
134 <citerefentry><refentrytitle>sysctl.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
135 <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
136 </para>
137 </refsect1>
138
139 </refentry>