systemd.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-systemd" role="wrap">
  8. <?dbhtml filename="systemd.html"?>
  9. <sect1info condition="script">
  10. <productname>systemd</productname>
  11. <productnumber>&systemd-version;</productnumber>
  12. <address>&systemd-url;</address>
  13. </sect1info>
  14. <title>Systemd-&systemd-version;</title>
  15. <indexterm zone="ch-system-systemd">
  16. <primary sortas="a-Systemd">Systemd</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <para>The Systemd package contains programs for controlling the startup,
  21. running, and shutdown of the system.</para>
  22. <segmentedlist>
  23. <segtitle>&buildtime;</segtitle>
  24. <segtitle>&diskspace;</segtitle>
  25. <seglistitem>
  26. <seg>&systemd-ch6-sbu;</seg>
  27. <seg>&systemd-ch6-du;</seg>
  28. </seglistitem>
  29. </segmentedlist>
  30. </sect2>
  31. <sect2 role="installation">
  32. <title>Installation of Systemd</title>
  33. <para>Prepare Systemd for compilation:</para>
  34. <screen><userinput remap="configure">./configure --prefix=/usr \
  35. --sysconfdir=/etc \
  36. --localstatedir=/var \
  37. --libexecdir=/usr/lib \
  38. --docdir=/usr/share/doc/systemd-&systemd-version; \
  39. --with-rootprefix= \
  40. --with-rootlibdir=/lib \
  41. --with-kbd-loadkeys=/bin/loadkeys \
  42. --with-kbd-setfont=/bin/setfont \
  43. --enable-split-usr \
  44. --disable-gudev \
  45. --without-python</userinput></screen>
  46. <variablelist>
  47. <title>The meaning of the configure options:</title>
  48. <varlistentry>
  49. <term><parameter>--with-root*</parameter></term>
  50. <listitem>
  51. <para>These switches ensure that core programs and
  52. shared libraries are installed in the subdirectories
  53. of the root partition.</para>
  54. </listitem>
  55. </varlistentry>
  56. <varlistentry>
  57. <term><parameter>--with-kbd-*</parameter></term>
  58. <listitem>
  59. <para>These switches tell Systemd where to find
  60. Kbd programs.</para>
  61. </listitem>
  62. </varlistentry>
  63. <varlistentry>
  64. <term><parameter>--enable-split-usr</parameter></term>
  65. <listitem>
  66. <para>This switch ensures that Systemd will work on
  67. systems where /bin, /lib and /sbin directories are not
  68. symlinks to their /usr counterparts.</para>
  69. </listitem>
  70. </varlistentry>
  71. <varlistentry>
  72. <term><parameter>--disable-gudev --without-python</parameter></term>
  73. <listitem>
  74. <para>These switches disable optional features because
  75. LFS does not provide their dependencies.</para>
  76. </listitem>
  77. </varlistentry>
  78. </variablelist>
  79. <para>Compile the package:</para>
  80. <screen><userinput remap="make">make</userinput></screen>
  81. <para>The package comes with a testsuite, but it doesn't work in
  82. chroot. It needs to be run from a system booted using Systemd.</para>
  83. <para>Install the package:</para>
  84. <screen><userinput remap="install">make install</userinput></screen>
  85. <para>Create the Sysvinit compatibility symlinks, so Systemd is used
  86. as the default init system:</para>
  87. <screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
  88. ln -sfv ../bin/systemctl /sbin/$tool
  89. done
  90. ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
  91. <para>By default, Journald logs to a tmpfs which means that logs
  92. are not persistent through reboots. To make it log to a disk,
  93. create the <filename class="directory">
  94. /var/log/journal</filename> directory:</para>
  95. <screen><userinput remap="install">mkdir -pv /var/log/journal</userinput></screen>
  96. <para>Remove a reference to a non-existent group:</para>
  97. <screen><userinput remap="install">sed -i "s@0775 root lock@0755 root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
  98. <para>Create the <filename>/etc/machine-id</filename> file needed by
  99. Journald:</para>
  100. <screen><userinput>systemd-machine-id-setup</userinput></screen>
  101. </sect2>
  102. <sect2 id="contents-systemd" role="content">
  103. <title>Contents of Systemd</title>
  104. <segmentedlist>
  105. <segtitle>Installed programs</segtitle>
  106. <segtitle>Installed libraries</segtitle>
  107. <segtitle>Installed directories</segtitle>
  108. <seglistitem>
  109. <seg>halt, hostnamectl, init, journalctl, localectl, loginctl,
  110. poweroff, reboot, runlevel, shutdown, systemctl, systemd-analyze,
  111. systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
  112. systemd-coredumpctl, systemd-delta, systemd-detect-virt,
  113. systemd-inhibit, systemd-machine-id-setup, systemd-notify,
  114. systemd-nspawn, systemd-stdio-bridge, systemd-tmpfiles,
  115. systemd-tty-ask-password-agent, telinit, timedatectl and
  116. udevadm</seg>
  117. <seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so,
  118. libsystemd-journal.so, libsystemd-login.so and libudev.so</seg>
  119. <seg>/etc/binfmt.d, /etc/init.d, /etc/modules-load.d, /etc/rpm,
  120. /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
  121. /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
  122. /usr/lib/binfmt.d, /usr/lib/modules-load.d, /usr/lib/sysctl.d,
  123. /usr/lib/systemd, /usr/lib/tmpfiles.d, /usr/share/doc/systemd-&systemd-version;,
  124. /usr/share/systemd, /var/lib/systemd and /var/log/journald</seg>
  125. </seglistitem>
  126. </segmentedlist>
  127. <variablelist>
  128. <bridgehead renderas="sect3">Short Descriptions</bridgehead>
  129. <?dbfo list-presentation="list"?>
  130. <?dbhtml list-presentation="table"?>
  131. <varlistentry id="halt">
  132. <term><command>halt</command></term>
  133. <listitem>
  134. <para>Normally invokes <command>shutdown</command> with the
  135. <parameter>-h</parameter> option, except when already in run-level 0,
  136. then it tells the kernel to halt the system; it notes in the
  137. file <filename>/var/log/wtmp</filename> that the system is being
  138. brought down.</para>
  139. <indexterm zone="ch-system-systemd halt">
  140. <primary sortas="b-halt">halt</primary>
  141. </indexterm>
  142. </listitem>
  143. </varlistentry>
  144. <varlistentry id="hostnamectl">
  145. <term><command>hostnamectl</command></term>
  146. <listitem>
  147. <para>used to query and change the system hostname and related
  148. settings.</para>
  149. <indexterm zone="ch-system-systemd hostnamectl">
  150. <primary sortas="b-hostnamectl">hostnamectl</primary>
  151. </indexterm>
  152. </listitem>
  153. </varlistentry>
  154. <varlistentry id="init">
  155. <term><command>init</command></term>
  156. <listitem>
  157. <para>The first process to be started when the kernel has initialized
  158. the hardware which takes over the boot process and starts all the
  159. proceses it is instructed to.</para>
  160. <indexterm zone="ch-system-systemd init">
  161. <primary sortas="b-init">init</primary>
  162. </indexterm>
  163. </listitem>
  164. </varlistentry>
  165. <varlistentry id="journalctl">
  166. <term><command>journalctl</command></term>
  167. <listitem>
  168. <para>used to query the contents of the Systemd Journal.</para>
  169. <indexterm zone="ch-system-systemd journalctl">
  170. <primary sortas="b-journalctl">journalctl</primary>
  171. </indexterm>
  172. </listitem>
  173. </varlistentry>
  174. <varlistentry id="localectl">
  175. <term><command>localectl</command></term>
  176. <listitem>
  177. <para>used to query and change the system locale and keyboard layout
  178. settings.</para>
  179. <indexterm zone="ch-system-systemd localectl">
  180. <primary sortas="b-localectl">localectl</primary>
  181. </indexterm>
  182. </listitem>
  183. </varlistentry>
  184. <varlistentry id="loginctl">
  185. <term><command>loginctl</command></term>
  186. <listitem>
  187. <para>used to introspect and control the state of the Systemd Login
  188. Manager.</para>
  189. <indexterm zone="ch-system-systemd loginctl">
  190. <primary sortas="b-loginctl">loginctl</primary>
  191. </indexterm>
  192. </listitem>
  193. </varlistentry>
  194. <varlistentry id="poweroff">
  195. <term><command>poweroff</command></term>
  196. <listitem>
  197. <para>Tells the kernel to halt the system and switch off the computer
  198. (see <command>halt</command>).</para>
  199. <indexterm zone="ch-system-systemd poweroff">
  200. <primary sortas="b-poweroff">poweroff</primary>
  201. </indexterm>
  202. </listitem>
  203. </varlistentry>
  204. <varlistentry id="reboot">
  205. <term><command>reboot</command></term>
  206. <listitem>
  207. <para>Tells the kernel to reboot the system (see
  208. <command>halt</command>).</para>
  209. <indexterm zone="ch-system-systemd reboot">
  210. <primary sortas="b-reboot">reboot</primary>
  211. </indexterm>
  212. </listitem>
  213. </varlistentry>
  214. <varlistentry id="runlevel">
  215. <term><command>runlevel</command></term>
  216. <listitem>
  217. <para>Reports the previous and the current run-level, as noted in the
  218. last run-level record in <filename>/var/run/utmp</filename>.</para>
  219. <indexterm zone="ch-system-systemd runlevel">
  220. <primary sortas="b-runlevel">runlevel</primary>
  221. </indexterm>
  222. </listitem>
  223. </varlistentry>
  224. <varlistentry id="shutdown">
  225. <term><command>shutdown</command></term>
  226. <listitem>
  227. <para>Brings the system down in a secure way, signaling all processes
  228. and notifying all logged-in users.</para>
  229. <indexterm zone="ch-system-systemd shutdown">
  230. <primary sortas="b-shutdown">shutdown</primary>
  231. </indexterm>
  232. </listitem>
  233. </varlistentry>
  234. <varlistentry id="systemctl">
  235. <term><command>systemctl</command></term>
  236. <listitem>
  237. <para>used to introspect and control the state of the Systemd system and
  238. service manager.</para>
  239. <indexterm zone="ch-system-systemd systemctl">
  240. <primary sortas="b-systemctl">systemctl</primary>
  241. </indexterm>
  242. </listitem>
  243. </varlistentry>
  244. <varlistentry id="systemd-analyze">
  245. <term><command>systemd-analyze</command></term>
  246. <listitem>
  247. <para>used to determine system boot-up performance of the current boot.
  248. </para>
  249. <indexterm zone="ch-system-systemd systemd-analyze">
  250. <primary sortas="b-systemd-analyze">systemd-analyze</primary>
  251. </indexterm>
  252. </listitem>
  253. </varlistentry>
  254. <varlistentry id="systemd-ask-password">
  255. <term><command>systemd-ask-password</command></term>
  256. <listitem>
  257. <para>used to query a system password or passphrase from the user, using a
  258. question message specified on the command line.</para>
  259. <indexterm zone="ch-system-systemd systemd-ask-password">
  260. <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
  261. </indexterm>
  262. </listitem>
  263. </varlistentry>
  264. <varlistentry id="systemd-cat">
  265. <term><command>systemd-cat</command></term>
  266. <listitem>
  267. <para>used to connect STDOUT and STDERR of a process with the Journal.
  268. </para>
  269. <indexterm zone="ch-system-systemd systemd-cat">
  270. <primary sortas="b-systemd-cat">systemd-cat</primary>
  271. </indexterm>
  272. </listitem>
  273. </varlistentry>
  274. <varlistentry id="systemd-cgls">
  275. <term><command>systemd-cgls</command></term>
  276. <listitem>
  277. <para>recursively shows the contents of the selected Linux control group
  278. hierarchy in a tree.</para>
  279. <indexterm zone="ch-system-systemd systemd-cgls">
  280. <primary sortas="b-systemd-cgls">systemd-cgls</primary>
  281. </indexterm>
  282. </listitem>
  283. </varlistentry>
  284. <varlistentry id="systemd-cgtop">
  285. <term><command>systemd-cgtop</command></term>
  286. <listitem>
  287. <para>shows the top control groups of the local Linux control group hierarchy,
  288. ordered by their CPU, memory and disk I/O load.</para>
  289. <indexterm zone="ch-system-systemd systemd-cgtop">
  290. <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
  291. </indexterm>
  292. </listitem>
  293. </varlistentry>
  294. <varlistentry id="systemd-coredumpctl">
  295. <term><command>systemd-coredumpctl</command></term>
  296. <listitem>
  297. <para>used to retrieve coredumps from the Systemd Journal</para>
  298. <indexterm zone="ch-system-systemd systemd-coredumpctl">
  299. <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
  300. </indexterm>
  301. </listitem>
  302. </varlistentry>
  303. <varlistentry id="systemd-delta">
  304. <term><command>systemd-delta</command></term>
  305. <listitem>
  306. <para>used to identify and compare configuration files in
  307. <filename class="directory">/etc</filename> that override default
  308. counterparts in <filename class="directory">/usr</filename>.</para>
  309. <indexterm zone="ch-system-systemd systemd-delta">
  310. <primary sortas="b-systemd-delta">systemd-delta</primary>
  311. </indexterm>
  312. </listitem>
  313. </varlistentry>
  314. <varlistentry id="systemd-detect-virt">
  315. <term><command>systemd-detect-virt</command></term>
  316. <listitem>
  317. <para>detects execution in a virtualized environment.</para>
  318. <indexterm zone="ch-system-systemd systemd-detect-virt">
  319. <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
  320. </indexterm>
  321. </listitem>
  322. </varlistentry>
  323. <varlistentry id="systemd-inhibit">
  324. <term><command>systemd-inhibit</command></term>
  325. <listitem>
  326. <para>used to execute a program with a shutdown, sleep or idle inhibitor lock
  327. taken.</para>
  328. <indexterm zone="ch-system-systemd systemd-inhibit">
  329. <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
  330. </indexterm>
  331. </listitem>
  332. </varlistentry>
  333. <varlistentry id="systemd-machine-id-setup">
  334. <term><command>systemd-machine-id-setup</command></term>
  335. <listitem>
  336. <para>used by system installer tools to initialize the machine ID stored in
  337. <filename>/etc/machine-id</filename> at install time with a randomly
  338. generated ID.</para>
  339. <indexterm zone="ch-system-systemd systemd-machine-id-setup">
  340. <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
  341. </indexterm>
  342. </listitem>
  343. </varlistentry>
  344. <varlistentry id="systemd-notify">
  345. <term><command>systemd-notify</command></term>
  346. <listitem>
  347. <para>used by daemon scripts to notify the init system about status changes.
  348. </para>
  349. <indexterm zone="ch-system-systemd systemd-notify">
  350. <primary sortas="b-systemd-notify">systemd-notify</primary>
  351. </indexterm>
  352. </listitem>
  353. </varlistentry>
  354. <varlistentry id="systemd-nspawn">
  355. <term><command>systemd-nspawn</command></term>
  356. <listitem>
  357. <para>used to run a command or OS in a light-weight namespace container.</para>
  358. <indexterm zone="ch-system-systemd systemd-nspawn">
  359. <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
  360. </indexterm>
  361. </listitem>
  362. </varlistentry>
  363. <!-- <varlistentry id="systemd-stdio-bridge">
  364. <term><command>systemd-stdio-bridge</command></term>
  365. <listitem>
  366. <para>To be completed</para>
  367. <indexterm zone="ch-system-systemd systemd-stdio-bridge">
  368. <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
  369. </indexterm>
  370. </listitem>
  371. </varlistentry> -->
  372. <varlistentry id="systemd-tmpfiles">
  373. <term><command>systemd-tmpfiles</command></term>
  374. <listitem>
  375. <para>creates, deletes and cleans up volatile and temporary files and directories,
  376. based on the configuration file format and location specified in
  377. <filename class="directory">tmpfiles.d</filename> directories.</para>
  378. <indexterm zone="ch-system-systemd systemd-tmpfiles">
  379. <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
  380. </indexterm>
  381. </listitem>
  382. </varlistentry>
  383. <varlistentry id="systemd-tty-ask-password-agent">
  384. <term><command>systemd-tty-ask-password-agent</command></term>
  385. <listitem>
  386. <para>used to list or process pending Systemd password requests</para>
  387. <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
  388. <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
  389. </indexterm>
  390. </listitem>
  391. </varlistentry>
  392. <varlistentry id="telinit">
  393. <term><command>telinit</command></term>
  394. <listitem>
  395. <para>Tells <command>init</command> which run-level to change to.</para>
  396. <indexterm zone="ch-system-systemd telinit">
  397. <primary sortas="b-telinit">telinit</primary>
  398. </indexterm>
  399. </listitem>
  400. </varlistentry>
  401. <varlistentry id="timedatectl">
  402. <term><command>timedatectl</command></term>
  403. <listitem>
  404. <para>used to query and change the system clock and its settings.
  405. </para>
  406. <indexterm zone="ch-system-systemd timedatectl">
  407. <primary sortas="b-timedatectl">timedatectl</primary>
  408. </indexterm>
  409. </listitem>
  410. </varlistentry>
  411. <varlistentry id="udevadm">
  412. <term><command>udevadm</command></term>
  413. <listitem>
  414. <para>Generic Udev administration tool: controls the udevd daemon,
  415. provides info from the Udev database, monitors uevents, waits for
  416. uevents to finish, tests Udev configuration, and triggers uevents
  417. for a given device.</para>
  418. <indexterm zone="ch-system-systemd udevadm">
  419. <primary sortas="b-udevadm">udevadm</primary>
  420. </indexterm>
  421. </listitem>
  422. </varlistentry>
  423. <varlistentry id="libsystemd-daemon">
  424. <term><filename class="libraryfile">libsystemd-daemon</filename></term>
  425. <listitem>
  426. <para>Systemd Daemon utility library.</para>
  427. <indexterm zone="ch-system-systemd libsystemd-daemon">
  428. <primary sortas="c-libsystemd-daemon">libsystemd-daemon</primary>
  429. </indexterm>
  430. </listitem>
  431. </varlistentry>
  432. <varlistentry id="libsystemd-id128">
  433. <term><filename class="libraryfile">libsystemd-id128</filename></term>
  434. <listitem>
  435. <para>Systemd 128 Bit ID utility library.</para>
  436. <indexterm zone="ch-system-systemd libsystemd-id128">
  437. <primary sortas="c-libsystemd-id128">libsystemd-id128</primary>
  438. </indexterm>
  439. </listitem>
  440. </varlistentry>
  441. <varlistentry id="libsystemd-journal">
  442. <term><filename class="libraryfile">libsystemd-journal</filename></term>
  443. <listitem>
  444. <para>Systemd Journal utility library.</para>
  445. <indexterm zone="ch-system-systemd libsystemd-journal">
  446. <primary sortas="c-libsystemd-journal">libsystemd-journal</primary>
  447. </indexterm>
  448. </listitem>
  449. </varlistentry>
  450. <varlistentry id="libsystemd-login">
  451. <term><filename class="libraryfile">libsystemd-login</filename></term>
  452. <listitem>
  453. <para>Systemd Login utility library.</para>
  454. <indexterm zone="ch-system-systemd libsystemd-login">
  455. <primary sortas="c-libsystemd-login">libsystemd-login</primary>
  456. </indexterm>
  457. </listitem>
  458. </varlistentry>
  459. <varlistentry id="libudev">
  460. <term><filename class="libraryfile">libudev</filename></term>
  461. <listitem>
  462. <para>A library to access Udev device information.</para>
  463. <indexterm zone="ch-system-systemd libudev">
  464. <primary sortas="c-libudev">libudev</primary>
  465. </indexterm>
  466. </listitem>
  467. </varlistentry>
  468. </variablelist>
  469. </sect2>
  470. </sect1>