systemd.xml 26 KB

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