1 systemd System and Service Manager
4 http://0pointer.de/blog/projects/systemd.html
7 https://www.freedesktop.org/wiki/Software/systemd
10 git@github.com:systemd/systemd.git
11 https://github.com/systemd/systemd
14 https://lists.freedesktop.org/mailman/listinfo/systemd-devel
17 #systemd on irc.libera.chat
20 https://github.com/systemd/systemd/issues
28 LGPLv2.1+ for all code
29 - except src/basic/MurmurHash2.c which is Public Domain
30 - except src/basic/siphash24.c which is CC0 Public Domain
31 - except src/journal/lookup3.c which is Public Domain
32 - except src/udev/* which is (currently still) GPLv2, GPLv2+
33 - except tools/chromiumos/* which is BSD-style
37 Linux kernel >= 4.2 for unified cgroup hierarchy support
38 Linux kernel >= 4.10 for cgroup-bpf egress and ingress hooks
39 Linux kernel >= 4.15 for cgroup-bpf device hook
40 Linux kernel >= 4.17 for cgroup-bpf socket address hooks
41 Linux kernel >= 5.3 for bounded-loops in BPF program
42 Linux kernel >= 5.4 for signed Verity images support
44 Kernel Config Options:
46 CONFIG_CGROUPS (it is OK to disable all controllers)
51 CONFIG_UNIX (it requires CONFIG_NET, but every other flag in it is not necessary)
54 CONFIG_FHANDLE (libudev, mount and bind mount handling)
56 Kernel crypto/hash API
57 CONFIG_CRYPTO_USER_API_HASH
61 udev will fail to work with the legacy sysfs layout:
62 CONFIG_SYSFS_DEPRECATED=n
64 Legacy hotplug slows down the system and confuses udev:
65 CONFIG_UEVENT_HELPER_PATH=""
67 Userspace firmware loading is not supported and should
68 be disabled in the kernel:
69 CONFIG_FW_LOADER_USER_HELPER=n
71 Some udev rules and virtualization detection relies on it:
74 Support for some SCSI devices serial number retrieval, to
75 create additional symlinks in /dev/disk/ and /dev/tape:
78 Required for PrivateNetwork= in service units:
80 Note that systemd-localed.service and other systemd units use
81 PrivateNetwork so this is effectively required.
83 Required for PrivateUsers= in service units:
86 Optional but strongly recommended:
90 CONFIG_{TMPFS,EXT4_FS,XFS,BTRFS_FS,...}_POSIX_ACL
92 CONFIG_SECCOMP_FILTER (required for seccomp support)
93 CONFIG_CHECKPOINT_RESTORE (for the kcmp() syscall)
95 Required for CPUShares= in resource control unit settings
97 CONFIG_FAIR_GROUP_SCHED
99 Required for CPUQuota= in resource control unit settings
102 Required for IPAddressDeny=, IPAddressAllow=, IPIngressFilterPath=,
103 IPEgressFilterPath= in resource control unit settings
111 Required for SocketBind{Allow|Deny}= in resource control unit settings
122 Required for signed Verity images support:
123 CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG
125 We recommend to turn off Real-Time group scheduling in the
126 kernel when using systemd. RT group scheduling effectively
127 makes RT scheduling unavailable for most userspace, since it
128 requires explicit assignment of RT budgets to each unit whose
129 processes making use of RT. As there's no sensible way to
130 assign these budgets automatically this cannot really be
131 fixed, and it's best to disable group scheduling hence.
132 CONFIG_RT_GROUP_SCHED=n
134 It's a good idea to disable the implicit creation of networking bonding
135 devices by the kernel networking bonding module, so that the
136 automatically created "bond0" interface doesn't conflict with any such
137 device created by systemd-networkd (or other tools). Ideally there
138 would be a kernel compile-time option for this, but there currently
139 isn't. The next best thing is to make this change through a modprobe.d
140 drop-in. This is shipped by default, see modprobe.d/systemd.conf.
142 Required for systemd-nspawn:
143 CONFIG_DEVPTS_MULTIPLE_INSTANCES or Linux kernel >= 4.7
145 Required for systemd-oomd:
148 Note that kernel auditing is broken when used with systemd's
149 container code. When using systemd in conjunction with
150 containers, please make sure to either turn off auditing at
151 runtime using the kernel command line option "audit=0", or
152 turn it off at kernel compile time using:
154 If systemd is compiled with libseccomp support on
155 architectures which do not use socketcall() and where seccomp
156 is supported (this effectively means x86-64 and ARM, but
157 excludes 32-bit x86!), then nspawn will now install a
158 work-around seccomp filter that makes containers boot even
159 with audit being enabled. This works correctly only on kernels
160 3.14 and newer though. TL;DR: turn audit off, still.
164 libmount >= 2.30 (from util-linux)
165 (util-linux *must* be built without --enable-libmount-support-mtab)
166 libseccomp >= 2.3.1 (optional)
167 libblkid >= 2.24 (from util-linux) (optional)
168 libkmod >= 15 (optional)
169 PAM >= 1.1.2 (optional)
170 libcryptsetup (optional), >= 2.3.0 required for signed Verity images support
173 libbpf >= 0.2.0 (optional)
174 libfdisk >= 2.33 (from util-linux) (optional)
175 libselinux (optional)
177 liblz4 >= 1.3.0 / 130 (optional)
178 libzstd >= 1.4.0 (optional)
180 libqrencode (optional)
181 libmicrohttpd (optional)
183 libidn2 or libidn (optional)
184 gnutls >= 3.1.4 (optional, >= 3.6.0 is required to support DNS-over-TLS with gnutls)
185 openssl >= 1.1.0 (optional, required to support DNS-over-TLS with openssl)
186 elfutils >= 158 (optional)
188 tzdata >= 2014f (optional)
191 docbook-xsl (optional, required for documentation)
192 xsltproc (optional, required for documentation)
194 python-lxml (optional, required to build the indices)
196 meson >= 0.46 (>= 0.49 is required to build position-independent executables)
198 gcc, awk, sed, grep, and similar tools
199 clang >= 10.0, llvm >= 10.0 (optional, required to build BPF programs
200 from source code in C)
202 During runtime, you need the following additional
205 util-linux >= v2.27.1 required
206 dbus >= 1.4.0 (strictly speaking optional, but recommended)
207 NOTE: If using dbus < 1.9.18, you should override the default
208 policy directory (--with-dbuspolicydir=/etc/dbus-1/system.d).
212 To build in directory build/:
213 meson setup build/ && meson compile -C build/
215 Any configuration options can be specified as -Darg=value... arguments
216 to meson. After the build directory is initially configured, meson will
217 refuse to run again, and options must be changed with:
218 meson configure -Darg=value build/
219 meson configure without any arguments will print out available options and
220 their current values.
223 meson compile -v -C build/ some/target
225 sudo meson install -C build/
226 DESTDIR=... meson install -C build/
228 A tarball can be created with:
229 git archive --format=tar --prefix=systemd-222/ v222 | xz > systemd-222.tar.xz
231 When systemd-hostnamed is used, it is strongly recommended to
232 install nss-myhostname to ensure that, in a world of
233 dynamically changing hostnames, the hostname stays resolvable
234 under all circumstances. In fact, systemd-hostnamed will warn
235 if nss-myhostname is not installed.
237 nss-systemd must be enabled on systemd systems, as that's required for
238 DynamicUser= to work. Note that we ship services out-of-the-box that
239 make use of DynamicUser= now, hence enabling nss-systemd is not
242 Note that the build prefix for systemd must be /usr. (Moreover,
243 packages systemd relies on — such as D-Bus — really should use the same
244 prefix, otherwise you are on your own.) -Dsplit-usr=false (which is the
245 default and does not need to be specified) is the recommended setting.
246 -Dsplit-usr=true can be used to give a semblance of support for systems
247 with programs installed split between / and /usr. Moving everything
248 under /usr is strongly encouraged.
250 Additional packages are necessary to run some tests:
251 - busybox (used by test/TEST-13-NSPAWN-SMOKE)
252 - nc (used by test/TEST-12-ISSUE-3171)
254 - python3-evdev (used by hwdb parsing tests)
255 - strace (used by test/test-functions)
256 - capsh (optional, used by test-execute)
259 Default udev rules use the following standard system group
260 names, which need to be resolvable by getgrnam() at any time,
261 even in the very early boot stages, where no other databases
262 and network are available:
264 audio, cdrom, dialout, disk, input, kmem, kvm, lp, render, tape, tty, video
266 During runtime, the journal daemon requires the
267 "systemd-journal" system group to exist. New journal files will
268 be readable by this group (but not writable), which may be used
269 to grant specific users read access. In addition, system
270 groups "wheel" and "adm" will be given read-only access to
271 journal files using systemd-tmpfiles.service.
273 The journal remote daemon requires the
274 "systemd-journal-remote" system user and group to
275 exist. During execution this network facing service will drop
276 privileges and assume this uid/gid for security reasons.
278 Similarly, the network management daemon requires the
279 "systemd-network" system user and group to exist.
281 Similarly, the name resolution daemon requires the
282 "systemd-resolve" system user and group to exist.
284 Similarly, the coredump support requires the
285 "systemd-coredump" system user and group to exist.
288 systemd ships with four glibc NSS modules:
290 nss-myhostname resolves the local hostname to locally configured IP
291 addresses, as well as "localhost" to 127.0.0.1/::1.
293 nss-resolve enables DNS resolution via the systemd-resolved DNS/LLMNR
294 caching stub resolver "systemd-resolved".
296 nss-mymachines enables resolution of all local containers registered
297 with machined to their respective IP addresses.
299 nss-systemd enables resolution of users/group registered via the
300 User/Group Record Lookup API (https://systemd.io/USER_GROUP_API),
301 including all dynamically allocated service users. (See the
302 DynamicUser= setting in unit files.)
304 To make use of these NSS modules, please add them to the "hosts:",
305 "passwd:" and "group:" lines in /etc/nsswitch.conf. The "resolve"
306 module should replace the glibc "dns" module in this file (and don't
307 worry, it chain-loads the "dns" module if it can't talk to resolved).
309 The four modules should be used in the following order:
311 passwd: compat systemd
312 group: compat systemd
313 hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname
316 When calling "systemctl enable/disable/is-enabled" on a unit which is a
317 SysV init.d script, it calls /usr/lib/systemd/systemd-sysv-install;
318 this needs to translate the action into the distribution specific
319 mechanism such as chkconfig or update-rc.d. Packagers need to provide
320 this script if you need this functionality (you don't if you disabled
323 Please see src/systemctl/systemd-sysv-install.SKELETON for how this
324 needs to look like, and provide an implementation at the marked places.
327 systemd will warn during early boot if /usr is not already mounted at
328 this point (that means: either located on the same file system as / or
329 already mounted in the initrd). While in systemd itself very little
330 will break if /usr is on a separate, late-mounted partition, many of
331 its dependencies very likely will break sooner or later in one form or
332 another. For example, udev rules tend to refer to binaries in /usr,
333 binaries that link to libraries in /usr or binaries that refer to data
334 files in /usr. Since these breakages are not always directly visible,
335 systemd will warn about this, since this kind of file system setup is
336 not really supported anymore by the basic set of Linux OS components.
338 systemd requires that the /run mount point exists. systemd also
339 requires that /var/run is a symlink to /run.
341 For more information on this issue consult
342 https://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
344 To run systemd under valgrind, compile with meson option
345 -Dvalgrind=true and have valgrind development headers installed
346 (i.e. valgrind-devel or equivalent). Otherwise, false positives will be
347 triggered by code which violates some rules but is actually safe. Note
348 that valgrind generates nice output only on exit(), hence on shutdown
349 we don't execve() systemd-shutdown.
351 STABLE BRANCHES AND BACKPORTS:
352 Stable branches with backported patches are available in the
353 systemd-stable repo at https://github.com/systemd/systemd-stable.
355 Stable branches are started for certain releases of systemd and named
356 after them, e.g. v238-stable. Stable branches are managed by
357 distribution maintainers on an as needed basis. See
358 https://www.freedesktop.org/wiki/Software/systemd/Backports/ for some
359 more information and examples.