systemd.xml 29 KB

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