systemd.xml 26 KB

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