systemd.xml 26 KB

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