1
0

systemd.xml 26 KB

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