3 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5 SPDX-License-Identifier: LGPL-2.1+
7 This file is part of systemd.
9 Copyright 2012 Lennart Poettering
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 2.1 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id=
"systemd-sysctl.service"
25 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
28 <title>systemd-sysctl.service
</title>
29 <productname>systemd
</productname>
33 <contrib>Developer
</contrib>
34 <firstname>Lennart
</firstname>
35 <surname>Poettering
</surname>
36 <email>lennart@poettering.net
</email>
42 <refentrytitle>systemd-sysctl.service
</refentrytitle>
43 <manvolnum>8</manvolnum>
47 <refname>systemd-sysctl.service
</refname>
48 <refname>systemd-sysctl
</refname>
49 <refpurpose>Configure kernel parameters at boot
</refpurpose>
54 <command>/usr/lib/systemd/systemd-sysctl
</command>
55 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
56 <arg choice=
"opt" rep=
"repeat"><replaceable>CONFIGFILE
</replaceable></arg>
58 <para><filename>systemd-sysctl.service
</filename></para>
62 <title>Description
</title>
64 <para><filename>systemd-sysctl.service
</filename> is an early boot
65 service that configures
66 <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
67 kernel parameters by invoking
<command>/usr/lib/systemd/systemd-sysctl
</command>.
</para>
69 <para>When invoked with no arguments,
<command>/usr/lib/systemd/systemd-sysctl
</command> applies
70 all directives from configuration files listed in
71 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
72 If one or more filenames are passed on the command line, only the directives in these files are
75 <para>In addition,
<option>--prefix=
</option> option may be used to limit which sysctl
76 settings are applied.
</para>
79 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
80 for information about the configuration of sysctl settings. After sysctl configuration is
81 changed on disk, it must be written to the files in
<filename>/proc/sys
</filename> before it
82 takes effect. It is possible to update specific settings, or simply to reload all configuration,
83 see Examples below.
</para>
86 <refsect1><title>Options
</title>
88 <varlistentry id='prefix'
>
89 <term><option>--prefix=
</option></term>
91 <para>Only apply rules with the specified prefix.
</para>
95 <xi:include href=
"standard-options.xml" xpointer=
"help" />
96 <xi:include href=
"standard-options.xml" xpointer=
"version" />
102 <title>Examples
</title>
105 <title>Reset all sysctl settings
</title>
107 <programlisting>systemctl restart systemd-sysctl
</programlisting>
111 <title>View coredump handler configuration
</title>
113 <programlisting># sysctl kernel.core_pattern
114 kernel.core_pattern = |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I
119 <title>Update coredump handler configuration
</title>
121 <programlisting># /usr/lib/systemd/systemd-sysctl --prefix kernel.core_pattern
</programlisting>
123 <para>This searches all the directories listed in
124 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
125 for configuration files and writes
<filename>/proc/sys/kernel/core_pattern
</filename>.
</para>
129 <title>Update coredump handler configuration according to a specific file
</title>
131 <programlisting># /usr/lib/systemd/systemd-sysctl
50-coredump.conf
</programlisting>
133 <para>This applies all the settings found in
<filename>50-coredump.conf
</filename>.
134 Either
<filename>/etc/sysctl.d/
50-coredump.conf
</filename>, or
135 <filename>/run/sysctl.d/
50-coredump.conf
</filename>, or
136 <filename>/usr/lib/sysctl.d/
50-coredump.conf
</filename> will be used, in the order
137 of preference.
</para>
141 <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
142 for various ways to directly apply sysctl settings.
</para>
146 <title>See Also
</title>
148 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
149 <citerefentry><refentrytitle>sysctl.d
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
150 <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,