blob: bc7068a66da294cd150d5e02cdcc971a6a9284ea [file] [log] [blame]
Lennart Poetteringd657c512012-01-25 02:20:38 +01001systemd System and Service Manager
Lennart Poettering31cee6f2010-05-13 03:30:21 +02002
3DETAILS:
4 http://0pointer.de/blog/projects/systemd.html
5
6WEB SITE:
7 http://www.freedesktop.org/wiki/Software/systemd
8
9GIT:
Jonathan Boulleeb0914f2015-06-02 15:57:50 -070010 git@github.com:systemd/systemd.git
11 https://github.com/systemd/systemd.git
Lennart Poettering31cee6f2010-05-13 03:30:21 +020012
13GITWEB:
Jonathan Boulleeb0914f2015-06-02 15:57:50 -070014 https://github.com/systemd/systemd
Lennart Poettering31cee6f2010-05-13 03:30:21 +020015
16MAILING LIST:
17 http://lists.freedesktop.org/mailman/listinfo/systemd-devel
18 http://lists.freedesktop.org/mailman/listinfo/systemd-commits
19
20IRC:
21 #systemd on irc.freenode.org
22
23BUG REPORTS:
Jonathan Boulleeb0914f2015-06-02 15:57:50 -070024 https://github.com/systemd/systemd/issues
Lennart Poettering31cee6f2010-05-13 03:30:21 +020025
26AUTHOR:
Lennart Poettering5430f7f2012-04-12 00:20:58 +020027 Lennart Poettering
28 Kay Sievers
29 ...and many others
Lennart Poettering31cee6f2010-05-13 03:30:21 +020030
Lennart Poettering673eab92011-07-14 23:53:53 +020031LICENSE:
Lennart Poettering5430f7f2012-04-12 00:20:58 +020032 LGPLv2.1+ for all code
Kay Sieversa0953152015-06-09 14:27:33 +020033 - except src/basic/MurmurHash2.c which is Public Domain
34 - except src/basic/siphash24.c which is CC0 Public Domain
Kay Sievers85424722013-08-14 22:58:21 +020035 - except src/journal/lookup3.c which is Public Domain
36 - except src/udev/* which is (currently still) GPLv2, GPLv2+
Lennart Poettering673eab92011-07-14 23:53:53 +020037
Lennart Poettering31cee6f2010-05-13 03:30:21 +020038REQUIREMENTS:
Lennart Poetteringa0c3e162015-09-06 15:58:20 +020039 Linux kernel >= 3.11
40 Linux kernel >= 4.2 for unified cgroup hierarchy support
Kay Sievers23aedd02014-03-22 18:27:35 +010041
42 Kernel Config Options:
Kay Sievers713bc0c2013-03-06 19:36:39 +010043 CONFIG_DEVTMPFS
Jan Engelhardtd28315e2014-05-03 19:15:23 +020044 CONFIG_CGROUPS (it is OK to disable all controllers)
Kay Sievers713bc0c2013-03-06 19:36:39 +010045 CONFIG_INOTIFY_USER
46 CONFIG_SIGNALFD
47 CONFIG_TIMERFD
48 CONFIG_EPOLL
Kay Sievers41938692013-03-06 19:51:52 +010049 CONFIG_NET
Kay Sievers713bc0c2013-03-06 19:36:39 +010050 CONFIG_SYSFS
Shawn Landden06d461e2013-12-09 07:04:06 -080051 CONFIG_PROC_FS
Kay Sievers5d319742014-02-15 17:21:49 +010052 CONFIG_FHANDLE (libudev, mount and bind mount handling)
Kay Sievers713bc0c2013-03-06 19:36:39 +010053
Kay Sieversbe2ea722014-08-30 11:34:20 +020054 udev will fail to work with the legacy sysfs layout:
Kay Sieversf28cbd02013-03-06 20:01:45 +010055 CONFIG_SYSFS_DEPRECATED=n
Kay Sievers713bc0c2013-03-06 19:36:39 +010056
57 Legacy hotplug slows down the system and confuses udev:
58 CONFIG_UEVENT_HELPER_PATH=""
59
Kay Sieversbe2ea722014-08-30 11:34:20 +020060 Userspace firmware loading is not supported and should
61 be disabled in the kernel:
Kay Sievers713bc0c2013-03-06 19:36:39 +010062 CONFIG_FW_LOADER_USER_HELPER=n
63
64 Some udev rules and virtualization detection relies on it:
65 CONFIG_DMIID
66
Kay Sieversa5c724b2013-09-15 07:29:25 +020067 Support for some SCSI devices serial number retrieval, to
68 create additional symlinks in /dev/disk/ and /dev/tape:
69 CONFIG_BLK_DEV_BSG
70
Zbigniew Jędrzejewski-Szmekb52a4a32014-12-30 09:57:01 -050071 Required for PrivateNetwork and PrivateDevices in service units:
Mike Gilbert13468822014-03-31 14:28:23 -040072 CONFIG_NET_NS
Zbigniew Jędrzejewski-Szmekb52a4a32014-12-30 09:57:01 -050073 CONFIG_DEVPTS_MULTIPLE_INSTANCES
74 Note that systemd-localed.service and other systemd units use
75 PrivateNetwork and PrivateDevices so this is effectively required.
Mike Gilbert13468822014-03-31 14:28:23 -040076
Kay Sievers713bc0c2013-03-06 19:36:39 +010077 Optional but strongly recommended:
78 CONFIG_IPV6
79 CONFIG_AUTOFS4_FS
Kay Sievers713bc0c2013-03-06 19:36:39 +010080 CONFIG_TMPFS_XATTR
Zbigniew Jędrzejewski-Szmeka6cccd82015-03-03 09:00:39 -050081 CONFIG_{TMPFS,EXT4,XFS,BTRFS_FS,...}_POSIX_ACL
Kay Sieversf28cbd02013-03-06 20:01:45 +010082 CONFIG_SECCOMP
Lennart Poettering3b920d72015-05-18 16:35:24 +020083 CONFIG_CHECKPOINT_RESTORE (for the kcmp() syscall)
Kay Sievers713bc0c2013-03-06 19:36:39 +010084
Lennart Poetteringf4e74be2015-07-11 14:18:35 -030085 Required for CPUShares= in resource control unit settings
Umut Tezduyar Lindskoga21b4672014-06-10 23:29:30 +020086 CONFIG_CGROUP_SCHED
87 CONFIG_FAIR_GROUP_SCHED
88
Lennart Poetteringf4e74be2015-07-11 14:18:35 -030089 Required for CPUQuota= in resource control unit settings
WaLyong Cho0acd5a02014-11-19 00:13:43 +090090 CONFIG_CFS_BANDWIDTH
91
Shawn Landden06d461e2013-12-09 07:04:06 -080092 For systemd-bootchart, several proc debug interfaces are required:
Kay Sievers713bc0c2013-03-06 19:36:39 +010093 CONFIG_SCHEDSTATS
94 CONFIG_SCHED_DEBUG
95
Kay Sieversf28cbd02013-03-06 20:01:45 +010096 For UEFI systems:
Thomas Bächlerf33016f2014-03-22 01:41:12 +010097 CONFIG_EFIVAR_FS
Kay Sieversf28cbd02013-03-06 20:01:45 +010098 CONFIG_EFI_PARTITION
99
Lennart Poetteringf4e74be2015-07-11 14:18:35 -0300100 We recommend to turn off Real-Time group scheduling in the
101 kernel when using systemd. RT group scheduling effectively
102 makes RT scheduling unavailable for most userspace, since it
103 requires explicit assignment of RT budgets to each unit whose
104 processes making use of RT. As there's no sensible way to
105 assign these budgets automatically this cannot really be
106 fixed, and it's best to disable group scheduling hence.
107 CONFIG_RT_GROUP_SCHED=n
108
Lennart Poettering77b6e192013-05-10 00:14:12 +0200109 Note that kernel auditing is broken when used with systemd's
110 container code. When using systemd in conjunction with
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200111 containers, please make sure to either turn off auditing at
Lennart Poettering77b6e192013-05-10 00:14:12 +0200112 runtime using the kernel command line option "audit=0", or
113 turn it off at kernel compile time using:
114 CONFIG_AUDIT=n
Lennart Poetteringa7b1c392014-03-11 05:40:36 +0100115 If systemd is compiled with libseccomp support on
116 architectures which do not use socketcall() and where seccomp
117 is supported (this effectively means x86-64 and ARM, but
Jan Engelhardt70a44af2014-05-03 19:15:24 +0200118 excludes 32-bit x86!), then nspawn will now install a
Lennart Poetteringa7b1c392014-03-11 05:40:36 +0100119 work-around seccomp filter that makes containers boot even
120 with audit being enabled. This works correctly only on kernels
121 3.14 and newer though. TL;DR: turn audit off, still.
Lennart Poettering77b6e192013-05-10 00:14:12 +0200122
Łukasz Stelmach3dd26f32015-04-10 19:39:17 +0200123 glibc >= 2.16
Lennart Poettering3ede8352011-02-16 19:09:11 +0100124 libcap
Martin Pitt1d40ddb2015-11-02 10:05:20 -0600125 libmount >= 2.27.1 (from util-linux)
Ronny Chevalierc0467cf2014-02-12 01:29:54 +0100126 libseccomp >= 1.0.0 (optional)
Gabriel de Perthuisd47f6ca2014-12-13 01:56:56 +0100127 libblkid >= 2.24 (from util-linux) (optional)
Tom Gundersena18535d2013-10-17 19:49:19 +0200128 libkmod >= 15 (optional)
Lennart Poettering3ede8352011-02-16 19:09:11 +0100129 PAM >= 1.1.2 (optional)
130 libcryptsetup (optional)
131 libaudit (optional)
Zbigniew Jędrzejewski-Szmek19d5d4c2011-07-12 13:57:48 +0200132 libacl (optional)
Lennart Poettering3ede8352011-02-16 19:09:11 +0100133 libselinux (optional)
Zbigniew Jędrzejewski-Szmek19d5d4c2011-07-12 13:57:48 +0200134 liblzma (optional)
Zbigniew Jędrzejewski-Szmeka509e0e2014-07-07 18:29:19 -0400135 liblz4 >= 119 (optional)
Lennart Poettering7b17a7d2012-09-28 00:46:32 +0200136 libgcrypt (optional)
137 libqrencode (optional)
138 libmicrohttpd (optional)
Zbigniew Jędrzejewski-Szmek2cc86f02012-11-22 15:30:50 +0100139 libpython (optional)
Lennart Poetteringf9ffbca2014-08-20 00:14:09 +0200140 libidn (optional)
Lennart Poettering5b244712014-06-23 12:42:17 +0200141 elfutils >= 158 (optional)
Zbigniew Jędrzejewski-Szmek2cc86f02012-11-22 15:30:50 +0100142 make, gcc, and similar tools
Lennart Poettering3ede8352011-02-16 19:09:11 +0100143
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200144 During runtime, you need the following additional
145 dependencies:
Zbigniew Jędrzejewski-Szmek2cc86f02012-11-22 15:30:50 +0100146
Martin Pitt1d40ddb2015-11-02 10:05:20 -0600147 util-linux >= v2.27.1 required
Tom Gundersendf417762013-11-27 16:50:53 +0100148 dbus >= 1.4.0 (strictly speaking optional, but recommended)
Zbigniew Jędrzejewski-Szmek2cc86f02012-11-22 15:30:50 +0100149 dracut (optional)
Lennart Poettering46ba8aa2013-02-13 22:56:43 +0100150 PolicyKit (optional)
Zbigniew Jędrzejewski-Szmek2cc86f02012-11-22 15:30:50 +0100151
Kay Sievers82627062015-06-23 13:40:53 +0200152 When building from git, the following tools are needed:
Lennart Poettering3ede8352011-02-16 19:09:11 +0100153
Peter Wallerf4e53542014-12-22 12:33:19 +0000154 pkg-config
Lennart Poettering3ede8352011-02-16 19:09:11 +0100155 docbook-xsl
156 xsltproc
157 automake
158 autoconf
159 libtool
Zbigniew Jędrzejewski-Szmek19d5d4c2011-07-12 13:57:48 +0200160 intltool
Michael Bieblb62cfce2011-08-03 17:09:55 +0200161 gperf
Zbigniew Jędrzejewski-Szmek19d5d4c2011-07-12 13:57:48 +0200162 python (optional)
Zbigniew Jędrzejewski-Szmek32dcef32014-02-12 02:58:41 -0500163 python-lxml (optional, but required to build the indices)
Lennart Poettering21bc9232011-02-23 01:12:07 +0100164
Kay Sievers82627062015-06-23 13:40:53 +0200165 The build system is initialized with ./autogen.sh. A tar ball
166 can be created with:
167 git archive --format=tar --prefix=systemd-222/ v222 | xz > systemd-222.tar.xz
168
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200169 When systemd-hostnamed is used, it is strongly recommended to
170 install nss-myhostname to ensure that, in a world of
171 dynamically changing hostnames, the hostname stays resolvable
Lennart Poetteringfff2e5b2011-05-17 19:35:56 +0200172 under all circumstances. In fact, systemd-hostnamed will warn
Kay Sieversbf9e4772013-01-24 10:31:34 +0100173 if nss-myhostname is not installed.
Lennart Poetteringfff2e5b2011-05-17 19:35:56 +0200174
Lennart Poetteringa24c64f2013-03-05 18:53:21 +0100175USERS AND GROUPS:
Lennart Poettering37495ee2013-03-05 19:15:31 +0100176 Default udev rules use the following standard system group
177 names, which need to be resolvable by getgrnam() at any time,
178 even in the very early boot stages, where no other databases
179 and network are available:
180
Kay Sievers3dff3e02014-06-12 14:59:53 +0200181 audio, cdrom, dialout, disk, input, kmem, lp, tape, tty, video
Kay Sievers37c0e8f2013-03-05 19:04:48 +0100182
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200183 During runtime, the journal daemon requires the
Michael Biebl1a9ce3f2013-03-05 19:19:26 +0100184 "systemd-journal" system group to exist. New journal files will
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200185 be readable by this group (but not writable), which may be used
Zbigniew Jędrzejewski-Szmeka48a62a2015-01-18 15:05:40 -0500186 to grant specific users read access. In addition, system
187 groups "wheel" and "adm" will be given read-only access to
188 journal files using systemd-tmpfiles.service.
Lennart Poetteringa24c64f2013-03-05 18:53:21 +0100189
Lennart Poettering37495ee2013-03-05 19:15:31 +0100190 The journal gateway daemon requires the
Michael Biebl1a9ce3f2013-03-05 19:19:26 +0100191 "systemd-journal-gateway" system user and group to
Lennart Poettering37495ee2013-03-05 19:15:31 +0100192 exist. During execution this network facing service will drop
193 privileges and assume this uid/gid for security reasons.
194
Jan Engelhardt8d0e0dd2014-06-28 00:48:28 +0200195 Similarly, the NTP daemon requires the "systemd-timesync" system
Lennart Poettering323a2f02014-06-04 11:17:32 +0200196 user and group to exist.
Lennart Poetteringa349eb12014-05-17 20:33:47 +0200197
Jan Engelhardt8d0e0dd2014-06-28 00:48:28 +0200198 Similarly, the network management daemon requires the
Lennart Poettering323a2f02014-06-04 11:17:32 +0200199 "systemd-network" system user and group to exist.
Lennart Poetteringe15007b2014-06-01 09:35:19 +0200200
Jan Engelhardt8d0e0dd2014-06-28 00:48:28 +0200201 Similarly, the name resolution daemon requires the
Lennart Poettering323a2f02014-06-04 11:17:32 +0200202 "systemd-resolve" system user and group to exist.
203
Jan Engelhardt8d0e0dd2014-06-28 00:48:28 +0200204 Similarly, the kdbus dbus1 proxy daemon requires the
Lennart Poettering323a2f02014-06-04 11:17:32 +0200205 "systemd-bus-proxy" system user and group to exist.
Tom Gundersen682265d2014-06-01 22:01:20 +0100206
Lennart Poetteringa4a79602014-08-19 21:55:10 +0200207NSS:
208 systemd ships with three NSS modules:
209
210 nss-myhostname resolves the local hostname to locally
211 configured IP addresses, as well as "localhost" to
212 127.0.0.1/::1.
213
214 nss-resolve enables DNS resolution via the systemd-resolved
215 DNS/LLMNR caching stub resolver "systemd-resolved".
216
217 nss-mymachines enables resolution of all local containers
218 registered with machined to their respective IP addresses.
219
220 To make use of these NSS modules, please add them to the
221 "hosts: " line in /etc/nsswitch.conf. The "resolve" module
222 should replace the glibc "dns" module in this file.
223
224 The three modules should be used in the following order:
225
226 hosts: files mymachines resolve myhostname
227
Martin Pitt0f0467e2015-05-27 17:04:49 +0200228SYSV INIT.D SCRIPTS:
229 When calling "systemctl enable/disable/is-enabled" on a unit which is a
230 SysV init.d script, it calls /usr/lib/systemd/systemd-sysv-install;
231 this needs to translate the action into the distribution specific
232 mechanism such as chkconfig or update-rc.d. Packagers need to provide
233 this script if you need this functionality (you don't if you disabled
234 SysV init support).
235
236 Please see src/systemctl/systemd-sysv-install.SKELETON for how this
237 needs to look like, and provide an implementation at the marked places.
238
Lennart Poettering21bc9232011-02-23 01:12:07 +0100239WARNINGS:
Daniel Mack37b76fd2015-09-09 15:27:19 +0200240 systemd will freeze execution during boot if /etc/mtab exists
241 but is not a symlink to /proc/mounts. Please ensure that
242 /etc/mtab is a proper symlink.
Lennart Poettering21bc9232011-02-23 01:12:07 +0100243
244 systemd will warn you during boot if /usr is on a different
245 file system than /. While in systemd itself very little will
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200246 break if /usr is on a separate partition, many of its
Lennart Poettering21bc9232011-02-23 01:12:07 +0100247 dependencies very likely will break sooner or later in one
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200248 form or another. For example, udev rules tend to refer to
Lennart Poettering21bc9232011-02-23 01:12:07 +0100249 binaries in /usr, binaries that link to libraries in /usr or
250 binaries that refer to data files in /usr. Since these
Jan Engelhardt19aadac2013-10-22 01:50:48 +0200251 breakages are not always directly visible, systemd will warn
Lennart Poettering21bc9232011-02-23 01:12:07 +0100252 about this, since this kind of file system setup is not really
253 supported anymore by the basic set of Linux OS components.
Lennart Poetteringfc7a7442011-03-01 23:44:26 +0100254
Lennart Poettering47bc23c2014-02-26 02:54:37 +0100255 systemd requires that the /run mount point exists. systemd also
Ronny Chevalier8f42ccd2015-05-30 10:31:41 +0200256 requires that /var/run is a symlink to /run.
Lennart Poettering47bc23c2014-02-26 02:54:37 +0100257
Lennart Poetteringaa167132011-03-04 05:07:01 +0100258 For more information on this issue consult
259 http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken
260
Zbigniew Jędrzejewski-Szmek1b4bb4f2012-10-12 12:56:19 +0000261 To run systemd under valgrind, compile with VALGRIND defined
262 (e.g. ./configure CPPFLAGS='... -DVALGRIND=1'). Otherwise,
263 false positives will be triggered by code which violates
264 some rules but is actually safe.
Lennart Poettering2b671e92014-11-06 15:27:13 +0100265
Lennart Poettering2ed3de92015-07-11 14:16:40 -0300266 Currently, systemd-timesyncd defaults to use the Google NTP
267 servers if not specified otherwise at configure time. You
268 really should not ship an OS or device with this default
269 setting. See DISTRO_PORTING for details.