systemd.xml 22 KB

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