systemd.xml 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. <?xml version="1.0" encoding="UTF-8"?>
  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" revision="systemd">
  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>Systemd 软件包包含控制系统引导、运行和关闭的程序。</para>
  21. <segmentedlist>
  22. <segtitle>&buildtime;</segtitle>
  23. <segtitle>&diskspace;</segtitle>
  24. <seglistitem>
  25. <seg>&systemd-ch6-sbu;</seg>
  26. <seg>&systemd-ch6-du;</seg>
  27. </seglistitem>
  28. </segmentedlist>
  29. </sect2>
  30. <sect2 role="installation">
  31. <title>安装 systemd</title>
  32. <!--
  33. <para>应用一个补丁,修复两项致命的安全缺陷:</para>
  34. <screen><userinput remap="pre">patch -Np1 -i ../systemd-240-security_fixes-2.patch</userinput></screen>
  35. -->
  36. <para>创建一个符号链接,绕过不存在的 xsltproc:</para>
  37. <screen><userinput remap="pre">ln -sf /tools/bin/true /usr/bin/xsltproc</userinput></screen>
  38. <para>由于还没有安装好最终的 Util-Linux,
  39. 需要在适当的位置创建一些库的符号链接:</para>
  40. <screen><userinput remap="pre">for file in /tools/lib/lib{blkid,mount,uuid}.so*; do
  41. ln -sf $file /usr/lib/
  42. done</userinput></screen>
  43. <para>设定好 man 页面:</para>
  44. <screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen>
  45. <para>删除在 chroot 环境中无法构建的测试:</para>
  46. <screen><userinput remap="pre">sed '177,$ d' -i src/resolve/meson.build</userinput></screen>
  47. <!--
  48. <para>应用一个补丁,以修正使用 glibc-2.28 时构建失败的问题:</para>
  49. <screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-glibc_statx_fix-1.patch</userinput></screen>
  50. <para>应用一个补丁,修复使用 meson-0.48.0 构建时出现的错误:</para>
  51. <screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-meson-0.48.0_fixes-1.patch</userinput></screen>
  52. -->
  53. <para>从默认的 udev 规则中删除不必要的组
  54. <systemitem class="groupname">render</systemitem>:</para>
  55. <screen><userinput remap="pre">sed -i 's/GROUP="render", //' rules/50-udev-default.rules.in</userinput></screen>
  56. <para>准备安装 systemd:</para>
  57. <screen><userinput remap="configure">mkdir -p build
  58. cd build
  59. PKG_CONFIG_PATH="/usr/lib/pkgconfig:/tools/lib/pkgconfig" \
  60. LANG=en_US.UTF-8 \
  61. meson --prefix=/usr \
  62. --sysconfdir=/etc \
  63. --localstatedir=/var \
  64. -Dblkid=true \
  65. -Dbuildtype=release \
  66. -Ddefault-dnssec=no \
  67. -Dfirstboot=false \
  68. -Dinstall-tests=false \
  69. -Dkill-path=/bin/kill \
  70. -Dkmod-path=/bin/kmod \
  71. -Dldconfig=false \
  72. -Dmount-path=/bin/mount \
  73. -Drootprefix= \
  74. -Drootlibdir=/lib \
  75. -Dsplit-usr=true \
  76. -Dsulogin-path=/sbin/sulogin \
  77. -Dsysusers=false \
  78. -Dumount-path=/bin/umount \
  79. -Db_lto=false \
  80. ..</userinput></screen>
  81. <variablelist>
  82. <title>meson 选项的含义:</title>
  83. <varlistentry>
  84. <term><parameter>-D*-path=*</parameter></term>
  85. <listitem>
  86. <para>这些开关提供了 systemd 在运行时需要的二进制程序的位置,
  87. 这些程序有些尚未安装,有些的 pkgconfig 文件还在
  88. <filename>/tools/lib/pkgconfig</filename> 目录中。</para>
  89. </listitem>
  90. </varlistentry>
  91. <varlistentry>
  92. <term><parameter>-Ddefault-dnssec=no</parameter></term>
  93. <listitem>
  94. <para>这个开关禁用实验性的 DNSSEC 支持。</para>
  95. </listitem>
  96. </varlistentry>
  97. <varlistentry>
  98. <term><parameter>-Dfirstboot=false</parameter></term>
  99. <listitem>
  100. <para>这个开关防止 systemd 安装用于初始化设定系统的服务。
  101. 在 LFS 中所有工作都会手工完成,因此不需要它们。</para>
  102. </listitem>
  103. </varlistentry>
  104. <varlistentry>
  105. <term><parameter>-Dinstall-tests=false</parameter></term>
  106. <listitem>
  107. <para>这个开关防止 systemd 安装编译好的测试文件。</para>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry>
  111. <term><parameter>-Dldconfig=false</parameter></term>
  112. <listitem>
  113. <para>这个开关防止一个 systemd 单元的安装,它在引导时运行
  114. <command>ldconfig</command>,
  115. 这对于 LFS 等源代码发行版来说没有意义,还会增加引导时间。
  116. 如果您需要这个功能,可以删除这个开关。</para>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry>
  120. <term><parameter>-Droot*</parameter></term>
  121. <listitem>
  122. <para>这个开关保证核心程序和共享库被安装到 root 分区下的子目录中。
  123. </para>
  124. </listitem>
  125. </varlistentry>
  126. <varlistentry>
  127. <term><parameter>-Dsplit-usr=true</parameter></term>
  128. <listitem>
  129. <para>这个开关确保 systemd 能够在 /bin、/lib 和 /sbin
  130. 目录不是指向 /usr 中对应目录的符号链接的情况下工作。</para>
  131. </listitem>
  132. </varlistentry>
  133. <varlistentry>
  134. <term><parameter>-Dsysusers=false</parameter></term>
  135. <listitem>
  136. <para>这个开关防止 systemd 安装负责设定
  137. <filename>/etc/group</filename> 和
  138. <filename>/etc/passwd</filename> 文件的服务。
  139. 我们在上一章已经创建了这两个文件。</para>
  140. </listitem>
  141. </varlistentry>
  142. </variablelist>
  143. <para>编译该软件包:</para>
  144. <screen><userinput remap="make">LANG=en_US.UTF-8 ninja</userinput></screen>
  145. <!--
  146. <para>To test the package, execute the following command:</para>
  147. <screen><userinput remap="test">LANG=en_US.UTF-8 ninja test</userinput></screen>
  148. -->
  149. <para>安装该软件包:</para>
  150. <screen><userinput remap="install">LANG=en_US.UTF-8 ninja install</userinput></screen>
  151. <para>删除不需要的目录和文件:</para>
  152. <screen><userinput remap="install">rm -rfv /usr/lib/rpm
  153. rm -f /usr/bin/xsltproc</userinput></screen>
  154. <para>创建 <command>systemd-journald</command> 需要的
  155. <filename>/etc/machine-id</filename> 文件:</para>
  156. <screen><userinput remap="adjust">systemd-machine-id-setup</userinput></screen>
  157. <para>创建 <filename>/lib/systemd/systemd-user-sessions</filename>
  158. 脚本,使得非特权用户在没有 systemd-logind 的情况下也能登录:</para>
  159. <screen><userinput remap="adjust">cat &gt; /lib/systemd/systemd-user-sessions &lt;&lt; "EOF"
  160. #!/bin/bash
  161. rm -f /run/nologin
  162. EOF
  163. chmod 755 /lib/systemd/systemd-user-sessions</userinput></screen>
  164. </sect2>
  165. <sect2 id="contents-systemd" role="content">
  166. <title>systemd 的内容</title>
  167. <segmentedlist>
  168. <segtitle>安装的程序</segtitle>
  169. <segtitle>安装的库</segtitle>
  170. <segtitle>安装的目录</segtitle>
  171. <seglistitem>
  172. <seg>bootctl, busctl, coredumpctl, halt (到 systemctl 的符号链接),
  173. hostnamectl, init, journalctl, kernel-install, localectl, loginctl,
  174. machinectl, networkctl, portablectl, poweroff (到 systemctl
  175. 的符号链接), reboot (到 systemctl 的符号链接), resolvconf (到
  176. resolvectl 的符号链接), resolvectl, runlevel (到 systemctl 的符号链接), shutdown
  177. (到 systemctl 的符号链接), systemctl, systemd-analyze,
  178. systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
  179. systemd-delta, systemd-detect-virt, systemd-escape, systemd-hwdb,
  180. systemd-id128, systemd-inhibit, systemd-machine-id-setup,
  181. systemd-mount, systemd-notify, systemd-nspawn, systemd-path,
  182. systemd-resolve (到 resolvectl 的符号链接), systemd-run,
  183. systemd-socket-activate, systemd-stdio-bridge, systemd-tmpfiles,
  184. systemd-tty-ask-password-agent, systemd-umount (到 systemd-mount
  185. 的符号链接), telinit (到 systemctl 的符号链接), timedatectl, 以及
  186. udevadm</seg>
  187. <seg>libnss_myhostname.so.2, libnss_mymachines.so.2,
  188. libnss_resolve.so.2, libnss_systemd.so.2,
  189. libsystemd.so, libsystemd-shared-&systemd-version;.so (在 /lib/systemd 中),
  190. 以及 libudev.so</seg>
  191. <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
  192. /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
  193. /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
  194. /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
  195. /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
  196. /usr/share/doc/systemd-&systemd-version;, /usr/share/factory,
  197. /usr/share/systemd, /var/lib/systemd, 以及 /var/log/journal</seg>
  198. </seglistitem>
  199. </segmentedlist>
  200. <variablelist>
  201. <bridgehead renderas="sect3">简要描述</bridgehead>
  202. <?dbfo list-presentation="list"?>
  203. <?dbhtml list-presentation="table"?>
  204. <varlistentry id="bootctl">
  205. <term><command>bootctl</command></term>
  206. <listitem>
  207. <para>用于查询固件和启动管理器设置</para>
  208. <indexterm zone="ch-system-systemd bootctl">
  209. <primary sortas="b-bootctl">bootctl</primary>
  210. </indexterm>
  211. </listitem>
  212. </varlistentry>
  213. <varlistentry id="busctl">
  214. <term><command>busctl</command></term>
  215. <listitem>
  216. <para>用于探查和监视 D-bus 总线</para>
  217. <indexterm zone="ch-system-systemd busctl">
  218. <primary sortas="b-busctl">busctl</primary>
  219. </indexterm>
  220. </listitem>
  221. </varlistentry>
  222. <varlistentry id="coredumpctl">
  223. <term><command>coredumpctl</command></term>
  224. <listitem>
  225. <para>用于从 systemd 日志获取核心转储</para>
  226. <indexterm zone="ch-system-systemd coredumpctl">
  227. <primary sortas="b-coredumpctl">coredumpctl</primary>
  228. </indexterm>
  229. </listitem>
  230. </varlistentry>
  231. <varlistentry id="halt">
  232. <term><command>halt</command></term>
  233. <listitem>
  234. <para>一般以 <parameter>-h</parameter> 参数调用
  235. <command>shutdown</command> 命令,除非在运行级别已经为 0
  236. 时,则通知内核停止系统;在系统停止运行时它在
  237. <filename>/var/log/wtmp</filename> 中进行记录</para>
  238. <indexterm zone="ch-system-systemd halt">
  239. <primary sortas="b-halt">halt</primary>
  240. </indexterm>
  241. </listitem>
  242. </varlistentry>
  243. <varlistentry id="hostnamectl">
  244. <term><command>hostnamectl</command></term>
  245. <listitem>
  246. <para>查询和修改系统机器名</para>
  247. <indexterm zone="ch-system-systemd hostnamectl">
  248. <primary sortas="b-hostnamectl">hostnamectl</primary>
  249. </indexterm>
  250. </listitem>
  251. </varlistentry>
  252. <varlistentry id="init">
  253. <term><command>init</command></term>
  254. <listitem>
  255. <para>在内核初始化硬件后第一个启动的进程,
  256. 它接管引导过程,并根据它的配置文件启动所有进程。</para>
  257. <indexterm zone="ch-system-systemd init">
  258. <primary sortas="b-init">init</primary>
  259. </indexterm>
  260. </listitem>
  261. </varlistentry>
  262. <varlistentry id="journalctl">
  263. <term><command>journalctl</command></term>
  264. <listitem>
  265. <para>用于查询 systemd 日志的内容</para>
  266. <indexterm zone="ch-system-systemd journalctl">
  267. <primary sortas="b-journalctl">journalctl</primary>
  268. </indexterm>
  269. </listitem>
  270. </varlistentry>
  271. <varlistentry id="kernel-install">
  272. <term><command>kernel-install</command></term>
  273. <listitem>
  274. <para>用于在 /boot 中添加或删除内核和 initramfs 映像文件</para>
  275. <indexterm zone="ch-system-systemd kernel-install">
  276. <primary sortas="b-kernel-install">kernel-install</primary>
  277. </indexterm>
  278. </listitem>
  279. </varlistentry>
  280. <varlistentry id="localectl">
  281. <term><command>localectl</command></term>
  282. <listitem>
  283. <para>用于查询和修改系统 locale 和键盘布局设置</para>
  284. <indexterm zone="ch-system-systemd localectl">
  285. <primary sortas="b-localectl">localectl</primary>
  286. </indexterm>
  287. </listitem>
  288. </varlistentry>
  289. <varlistentry id="loginctl">
  290. <term><command>loginctl</command></term>
  291. <listitem>
  292. <para>用于探查和控制 systemd 登录管理器的状态</para>
  293. <indexterm zone="ch-system-systemd loginctl">
  294. <primary sortas="b-loginctl">loginctl</primary>
  295. </indexterm>
  296. </listitem>
  297. </varlistentry>
  298. <varlistentry id="machinectl">
  299. <term><command>machinectl</command></term>
  300. <listitem>
  301. <para>用于探查和控制 systemd 虚拟机和容器注册管理器的状态</para>
  302. <indexterm zone="ch-system-systemd machinectl">
  303. <primary sortas="b-machinectl">machinectl</primary>
  304. </indexterm>
  305. </listitem>
  306. </varlistentry>
  307. <varlistentry id="networkctl">
  308. <term><command>networkctl</command></term>
  309. <listitem>
  310. <para>用于探查 systemd-networkd 管理的网络连接状态</para>
  311. <indexterm zone="ch-system-systemd networkctl">
  312. <primary sortas="b-networkctl">networkctl</primary>
  313. </indexterm>
  314. </listitem>
  315. </varlistentry>
  316. <varlistentry id="portablectl">
  317. <term><command>portablectl</command></term>
  318. <listitem>
  319. <para>用于在本地系统附加或移除可移植服务</para>
  320. <indexterm zone="ch-system-systemd portablectl">
  321. <primary sortas="b-portablectl">portablectl</primary>
  322. </indexterm>
  323. </listitem>
  324. </varlistentry>
  325. <varlistentry id="poweroff">
  326. <term><command>poweroff</command></term>
  327. <listitem>
  328. <para>告诉内核停止系统运行并关闭计算机
  329. (见 <command>halt</command>)</para>
  330. <indexterm zone="ch-system-systemd poweroff">
  331. <primary sortas="b-poweroff">poweroff</primary>
  332. </indexterm>
  333. </listitem>
  334. </varlistentry>
  335. <varlistentry id="reboot">
  336. <term><command>reboot</command></term>
  337. <listitem>
  338. <para>告诉内核重启系统 (见
  339. <command>halt</command>)</para>
  340. <indexterm zone="ch-system-systemd reboot">
  341. <primary sortas="b-reboot">reboot</primary>
  342. </indexterm>
  343. </listitem>
  344. </varlistentry>
  345. <varlistentry id="resolvconf">
  346. <term><command>resolvconf</command></term>
  347. <listitem>
  348. <para>为 <command>systemd-resolved</command>
  349. 注册 DNS 服务器和域设置</para>
  350. <indexterm zone="ch-system-systemd resolvconf">
  351. <primary sortas="b-resolvconf">resolvconf</primary>
  352. </indexterm>
  353. </listitem>
  354. </varlistentry>
  355. <varlistentry id="resolvectl">
  356. <term><command>resolvectl</command></term>
  357. <listitem>
  358. <para>向网络名称解析管理器发送控制命令,
  359. 或解析域名,IPv4 和 IPv6 地址,DNS 记录,以及服务。</para>
  360. <indexterm zone="ch-system-systemd resolvectl">
  361. <primary sortas="b-resolvectl">resolvectl</primary>
  362. </indexterm>
  363. </listitem>
  364. </varlistentry>
  365. <varlistentry id="runlevel">
  366. <term><command>runlevel</command></term>
  367. <listitem>
  368. <para>报告当前系统运行级别和上一个运行级别,
  369. 上一个运行级别被记录在 <filename>/var/run/utmp</filename>
  370. 中</para>
  371. <indexterm zone="ch-system-systemd runlevel">
  372. <primary sortas="b-runlevel">runlevel</primary>
  373. </indexterm>
  374. </listitem>
  375. </varlistentry>
  376. <varlistentry id="shutdown">
  377. <term><command>shutdown</command></term>
  378. <listitem>
  379. <para>安全地关闭系统,向所有进程发送信号,并通知所有登录用户
  380. </para>
  381. <indexterm zone="ch-system-systemd shutdown">
  382. <primary sortas="b-shutdown">shutdown</primary>
  383. </indexterm>
  384. </listitem>
  385. </varlistentry>
  386. <varlistentry id="systemctl">
  387. <term><command>systemctl</command></term>
  388. <listitem>
  389. <para>用于探查和控制 systemd 系统和服务管理器的状态</para>
  390. <indexterm zone="ch-system-systemd systemctl">
  391. <primary sortas="b-systemctl">systemctl</primary>
  392. </indexterm>
  393. </listitem>
  394. </varlistentry>
  395. <varlistentry id="systemd-analyze">
  396. <term><command>systemd-analyze</command></term>
  397. <listitem>
  398. <para>用于分析当前运行系统的引导性能</para>
  399. <indexterm zone="ch-system-systemd systemd-analyze">
  400. <primary sortas="b-systemd-analyze">systemd-analyze</primary>
  401. </indexterm>
  402. </listitem>
  403. </varlistentry>
  404. <varlistentry id="systemd-ask-password">
  405. <term><command>systemd-ask-password</command></term>
  406. <listitem>
  407. <para>用于以命令行指定的消息向用户询问系统密码</para>
  408. <indexterm zone="ch-system-systemd systemd-ask-password">
  409. <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
  410. </indexterm>
  411. </listitem>
  412. </varlistentry>
  413. <varlistentry id="systemd-cat">
  414. <term><command>systemd-cat</command></term>
  415. <listitem>
  416. <para>用于将进程的标准输出和错误输出重定向到系统日志
  417. </para>
  418. <indexterm zone="ch-system-systemd systemd-cat">
  419. <primary sortas="b-systemd-cat">systemd-cat</primary>
  420. </indexterm>
  421. </listitem>
  422. </varlistentry>
  423. <varlistentry id="systemd-cgls">
  424. <term><command>systemd-cgls</command></term>
  425. <listitem>
  426. <para>用树的形式递归地显示指定 Linux 控制组 (cgroup)
  427. 层次结构的内容</para>
  428. <indexterm zone="ch-system-systemd systemd-cgls">
  429. <primary sortas="b-systemd-cgls">systemd-cgls</primary>
  430. </indexterm>
  431. </listitem>
  432. </varlistentry>
  433. <varlistentry id="systemd-cgtop">
  434. <term><command>systemd-cgtop</command></term>
  435. <listitem>
  436. <para>显示本地 Linux 控制组层次结构中占用资源最多的,
  437. 可以按 CPU 、内存和磁盘 I/O 负载排序</para>
  438. <indexterm zone="ch-system-systemd systemd-cgtop">
  439. <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
  440. </indexterm>
  441. </listitem>
  442. </varlistentry>
  443. <varlistentry id="systemd-delta">
  444. <term><command>systemd-delta</command></term>
  445. <listitem>
  446. <para>用于确定并比较那些覆盖了
  447. <filename class="directory">/usr</filename> 中默认值的
  448. <filename class="directory">/etc</filename>
  449. 中的配置文件</para>
  450. <indexterm zone="ch-system-systemd systemd-delta">
  451. <primary sortas="b-systemd-delta">systemd-delta</primary>
  452. </indexterm>
  453. </listitem>
  454. </varlistentry>
  455. <varlistentry id="systemd-detect-virt">
  456. <term><command>systemd-detect-virt</command></term>
  457. <listitem>
  458. <para>检测系统是否在虚拟化环境下运行</para>
  459. <indexterm zone="ch-system-systemd systemd-detect-virt">
  460. <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
  461. </indexterm>
  462. </listitem>
  463. </varlistentry>
  464. <varlistentry id="systemd-escape">
  465. <term><command>systemd-escape</command></term>
  466. <listitem>
  467. <para>用于转义字符串,以便将其包含在 systemd 单元名中</para>
  468. <indexterm zone="ch-system-systemd systemd-escape">
  469. <primary sortas="b-systemd-escape">systemd-escape</primary>
  470. </indexterm>
  471. </listitem>
  472. </varlistentry>
  473. <varlistentry id="systemd-hwdb">
  474. <term><command>systemd-hwdb</command></term>
  475. <listitem>
  476. <para>用于管理硬件数据库 (hwdb)</para>
  477. <indexterm zone="ch-system-systemd systemd-hwdb">
  478. <primary sortas="b-systemd-hwdb">systemd-hwdb</primary>
  479. </indexterm>
  480. </listitem>
  481. </varlistentry>
  482. <varlistentry id="systemd-id128">
  483. <term><command>systemd-id128</command></term>
  484. <listitem>
  485. <para>生成和打印 id128 串</para>
  486. <indexterm zone="ch-system-systemd systemd-id128">
  487. <primary sortas="b-systemd-id128">systemd-id128</primary>
  488. </indexterm>
  489. </listitem>
  490. </varlistentry>
  491. <varlistentry id="systemd-inhibit">
  492. <term><command>systemd-inhibit</command></term>
  493. <listitem>
  494. <para>用于在关机、休眠或待机抑制锁被锁定的情况下运行程序</para>
  495. <indexterm zone="ch-system-systemd systemd-inhibit">
  496. <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
  497. </indexterm>
  498. </listitem>
  499. </varlistentry>
  500. <varlistentry id="systemd-machine-id-setup">
  501. <term><command>systemd-machine-id-setup</command></term>
  502. <listitem>
  503. <para>被系统安装工具用于在安装时以随机生成的 ID 初始化
  504. <filename>/etc/machine-id</filename> 中的机器 ID</para>
  505. <indexterm zone="ch-system-systemd systemd-machine-id-setup">
  506. <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
  507. </indexterm>
  508. </listitem>
  509. </varlistentry>
  510. <varlistentry id="systemd-mount">
  511. <term><command>systemd-mount</command></term>
  512. <listitem>
  513. <para>一个用于临时挂载或自动挂载驱动器的工具</para>
  514. <indexterm zone="ch-system-systemd systemd-mount">
  515. <primary sortas="b-systemd-mount">systemd-mount</primary>
  516. </indexterm>
  517. </listitem>
  518. </varlistentry>
  519. <varlistentry id="systemd-notify">
  520. <term><command>systemd-notify</command></term>
  521. <listitem>
  522. <para>被守护脚本用于通知 init 系统关于状态变化的信息</para>
  523. <indexterm zone="ch-system-systemd systemd-notify">
  524. <primary sortas="b-systemd-notify">systemd-notify</primary>
  525. </indexterm>
  526. </listitem>
  527. </varlistentry>
  528. <varlistentry id="systemd-nspawn">
  529. <term><command>systemd-nspawn</command></term>
  530. <listitem>
  531. <para>用于在轻量级命名空间容器中运行命令或操作系统</para>
  532. <indexterm zone="ch-system-systemd systemd-nspawn">
  533. <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
  534. </indexterm>
  535. </listitem>
  536. </varlistentry>
  537. <varlistentry id="systemd-path">
  538. <term><command>systemd-path</command></term>
  539. <listitem>
  540. <para>用于查询系统和用户路径</para>
  541. <indexterm zone="ch-system-systemd systemd-path">
  542. <primary sortas="b-systemd-path">systemd-path</primary>
  543. </indexterm>
  544. </listitem>
  545. </varlistentry>
  546. <varlistentry id="systemd-resolve">
  547. <term><command>systemd-resolve</command></term>
  548. <listitem>
  549. <para>用于解析域名、IPv4 和 IPv6 地址、DNS 资源记录
  550. 以及服务</para>
  551. <indexterm zone="ch-system-systemd systemd-resolve">
  552. <primary sortas="b-systemd-resolve">systemd-resolve</primary>
  553. </indexterm>
  554. </listitem>
  555. </varlistentry>
  556. <varlistentry id="systemd-run">
  557. <term><command>systemd-run</command></term>
  558. <listitem>
  559. <para>用于创建一个临时的 .service 或 .scope 单元,
  560. 并在其中运行指定命令</para>
  561. <indexterm zone="ch-system-systemd systemd-run">
  562. <primary sortas="b-systemd-run">systemd-run</primary>
  563. </indexterm>
  564. </listitem>
  565. </varlistentry>
  566. <!-- <varlistentry id="systemd-stdio-bridge">
  567. <term><command>systemd-stdio-bridge</command></term>
  568. <listitem>
  569. <para>To be completed</para>
  570. <indexterm zone="ch-system-systemd systemd-stdio-bridge">
  571. <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
  572. </indexterm>
  573. </listitem>
  574. </varlistentry> -->
  575. <varlistentry id="systemd-socket-activate">
  576. <term><command>systemd-socket-activate</command></term>
  577. <listitem>
  578. <para>用于监听 socket 服务,并在连接时启动进程</para>
  579. <indexterm zone="ch-system-systemd systemd-socket-activate">
  580. <primary sortas="b-systemd-socket-activate">systemd-socket-activate</primary>
  581. </indexterm>
  582. </listitem>
  583. </varlistentry>
  584. <varlistentry id="systemd-tmpfiles">
  585. <term><command>systemd-tmpfiles</command></term>
  586. <listitem>
  587. <para>根据
  588. <filename class="directory">tmpfiles.d</filename>
  589. 目录中的配置文件给定的文件格式和位置,
  590. 创建、修改和清理易失性、临时性文件和目录</para>
  591. <indexterm zone="ch-system-systemd systemd-tmpfiles">
  592. <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
  593. </indexterm>
  594. </listitem>
  595. </varlistentry>
  596. <varlistentry id="systemd-umount">
  597. <term><command>systemd-umount</command></term>
  598. <listitem>
  599. <para>Unmount mount points</para>
  600. <indexterm zone="ch-system-systemd systemd-umount">
  601. <primary sortas="b-systemd-umount">systemd-umount</primary>
  602. </indexterm>
  603. </listitem>
  604. </varlistentry>
  605. <varlistentry id="systemd-tty-ask-password-agent">
  606. <term><command>systemd-tty-ask-password-agent</command></term>
  607. <listitem>
  608. <para>列出或处理等待中的 systemd 密码请求</para>
  609. <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
  610. <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
  611. </indexterm>
  612. </listitem>
  613. </varlistentry>
  614. <varlistentry id="telinit">
  615. <term><command>telinit</command></term>
  616. <listitem>
  617. <para>告诉 <command>init</command> 切换到某个运行级别</para>
  618. <indexterm zone="ch-system-systemd telinit">
  619. <primary sortas="b-telinit">telinit</primary>
  620. </indexterm>
  621. </listitem>
  622. </varlistentry>
  623. <varlistentry id="timedatectl">
  624. <term><command>timedatectl</command></term>
  625. <listitem>
  626. <para>用于查询和修改系统时钟及其设置
  627. </para>
  628. <indexterm zone="ch-system-systemd timedatectl">
  629. <primary sortas="b-timedatectl">timedatectl</primary>
  630. </indexterm>
  631. </listitem>
  632. </varlistentry>
  633. <varlistentry id="udevadm">
  634. <term><command>udevadm</command></term>
  635. <listitem>
  636. <para>通用 udev 管理工具:控制 udevd 守护进程,
  637. 提供 udev 数据库的信息,监视 udev 事件 ,等待 udev 事件结束,
  638. 测试 udev 配置,或对于给定设备触发 udev 事件</para>
  639. <indexterm zone="ch-system-systemd udevadm">
  640. <primary sortas="b-udevadm">udevadm</primary>
  641. </indexterm>
  642. </listitem>
  643. </varlistentry>
  644. <varlistentry id="libsystemd">
  645. <term><filename class="libraryfile">libsystemd</filename></term>
  646. <listitem>
  647. <para>主要的 systemd 工具库</para>
  648. <indexterm zone="ch-system-systemd libsystemd">
  649. <primary sortas="c-libsystemd">libsystemd</primary>
  650. </indexterm>
  651. </listitem>
  652. </varlistentry>
  653. <varlistentry id="libudev">
  654. <term><filename class="libraryfile">libudev</filename></term>
  655. <listitem>
  656. <para>用于访问 udev 设备信息的库</para>
  657. <indexterm zone="ch-system-systemd libudev">
  658. <primary sortas="c-libudev">libudev</primary>
  659. </indexterm>
  660. </listitem>
  661. </varlistentry>
  662. </variablelist>
  663. </sect2>
  664. </sect1>