systemd-custom.po 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-08-08 19:28+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. msgid "Systemd Usage and Configuration"
  15. msgstr "Systemd 使用和配置"
  16. #. type: Content of: <sect1><indexterm><primary>
  17. msgid "Systemd Customization"
  18. msgstr "Systemd 自定义设置"
  19. #. type: Content of: <sect1><sect2><title>
  20. msgid "Basic Configuration"
  21. msgstr "基础设置"
  22. #. type: Content of: <sect1><sect2><para>
  23. msgid ""
  24. "The <filename>/etc/systemd/system.conf</filename> file contains a set of "
  25. "options to control basic systemd operations. The default file has all "
  26. "entries commented out with the default settings indicated. This file is "
  27. "where the log level may be changed as well as some basic logging settings. "
  28. "See the <filename>systemd-system.conf(5)</filename> manual page for details "
  29. "on each configuration option."
  30. msgstr ""
  31. "<filename>/etc/systemd/system.conf</filename> 文件包含一组控制 systemd 基本功"
  32. "能的选项。默认文件中所有条目都被注释掉,并标明了默认值。可以在这里修改日志级"
  33. "别,以及其他一些基本日志设定。参阅 <filename>systemd-system.conf(5)</"
  34. "filename> man 手册页面了解每个选项的详细信息。"
  35. #. type: Content of: <sect1><sect2><title>
  36. msgid "Disabling Screen Clearing at Boot Time"
  37. msgstr "禁用引导时自动清屏"
  38. #. type: Content of: <sect1><sect2><para>
  39. msgid ""
  40. "The normal behavior for systemd is to clear the screen at the end of the "
  41. "boot sequence. If desired, this behavior may be changed by running the "
  42. "following command:"
  43. msgstr ""
  44. "Systemd 的默认行为是在引导过程结束时清除屏幕。如果希望的话,您可以运行以下命"
  45. "令,修改这一行为:"
  46. #. type: Content of: <sect1><sect2><screen>
  47. #, no-wrap
  48. msgid ""
  49. "<userinput>mkdir -pv /etc/systemd/system/getty@tty1.service.d\n"
  50. "\n"
  51. "cat &gt; /etc/systemd/system/getty@tty1.service.d/noclear.conf &lt;&lt; EOF\n"
  52. "<literal>[Service]\n"
  53. "TTYVTDisallocate=no</literal>\n"
  54. "EOF</userinput>"
  55. msgstr ""
  56. "<userinput>mkdir -pv /etc/systemd/system/getty@tty1.service.d\n"
  57. "\n"
  58. "cat &gt; /etc/systemd/system/getty@tty1.service.d/noclear.conf &lt;&lt; EOF\n"
  59. "<literal>[Service]\n"
  60. "TTYVTDisallocate=no</literal>\n"
  61. "EOF</userinput>"
  62. #. type: Content of: <sect1><sect2><para>
  63. msgid ""
  64. "The boot messages can always be reviewed by using the <userinput>journalctl -"
  65. "b</userinput> command as the root user."
  66. msgstr ""
  67. "您总是可以用 root 身份运行 <userinput>journalctl -b</userinput> 命令,查阅引"
  68. "导消息。"
  69. #. type: Content of: <sect1><sect2><title>
  70. msgid "Disabling tmpfs for /tmp"
  71. msgstr "禁止将 tmpfs 挂载到 /tmp"
  72. #. type: Content of: <sect1><sect2><para>
  73. msgid ""
  74. "By default, <filename class=\"directory\">/tmp</filename> is created as a "
  75. "tmpfs. If this is not desired, it can be overridden by executing the "
  76. "following command:"
  77. msgstr ""
  78. "默认情况下,<filename class=\"directory\">/tmp</filename> 将被挂载 tmpfs 文件"
  79. "系统。如果不希望这样,可以执行以下命令覆盖这一行为:"
  80. #. type: Content of: <sect1><sect2><screen>
  81. #, no-wrap
  82. msgid "<userinput>ln -sfv /dev/null /etc/systemd/system/tmp.mount</userinput>"
  83. msgstr "<userinput>ln -sfv /dev/null /etc/systemd/system/tmp.mount</userinput>"
  84. #. type: Content of: <sect1><sect2><para>
  85. msgid ""
  86. "Alternatively, if a a separate partition for <filename class=\"directory\">/"
  87. "tmp</filename> is desired, specify that partition in a <filename>/etc/fstab</"
  88. "filename> entry."
  89. msgstr ""
  90. "或者,如果希望使用一个单独的 <filename class=\"directory\">/tmp</filename> 分"
  91. "区,在 <filename>/etc/fstab</filename> 中为其添加一个条目。"
  92. #. type: Content of: <sect1><sect2><warning><para>
  93. msgid ""
  94. "Do not create the symbolic link above if a separate partition is used for "
  95. "<filename class=\"directory\">/tmp</filename>. This will prevent the root "
  96. "file system (/) from being remounted r/w and make the system unusable when "
  97. "booted."
  98. msgstr ""
  99. "如果使用了单独的 <filename class=\"directory\">/tmp</filename> 分区,不要创建"
  100. "上面的符号链接。这会导致根文件系统 (/) 无法重新挂载为可读写,使得系统在引导后"
  101. "不可用。"
  102. #. type: Content of: <sect1><sect2><title>
  103. msgid "Configuring Automatic File Creation and Deletion"
  104. msgstr "配置文件自动创建和删除"
  105. #. type: Content of: <sect1><sect2><para>
  106. msgid "There are several services that create or delete files or directories:"
  107. msgstr "有一些创建或删除文件、目录的服务:"
  108. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  109. msgid "systemd-tmpfiles-clean.service"
  110. msgstr "systemd-tmpfiles-clean.service"
  111. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  112. msgid "systemd-tmpfiles-setup-dev.service"
  113. msgstr "systemd-tmpfiles-setup-dev.service"
  114. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  115. msgid "systemd-tmpfiles-setup.service"
  116. msgstr "systemd-tmpfiles-setup.service"
  117. #. type: Content of: <sect1><sect2><para>
  118. msgid ""
  119. "The system location for the configuration files is <filename>/usr/lib/"
  120. "tmpfiles.d/*.conf</filename>. The local configuration files are in <filename "
  121. "class=\"directory\">/etc/tmpfiles.d</filename>. Files in <filename class="
  122. "\"directory\">/etc/tmpfiles.d</filename> override files with the same name "
  123. "in <filename class=\"directory\">/usr/lib/tmpfiles.d</filename>. See "
  124. "<filename>tmpfiles.d(5)</filename> manual page for file format details."
  125. msgstr ""
  126. "它们的系统配置文件位于 <filename>/usr/lib/tmpfiles.d/*.conf</filename>。本地"
  127. "配置文件位于 <filename class=\"directory\">/etc/tmpfiles.d</filename>。"
  128. "<filename class=\"directory\">/etc/tmpfiles.d</filename> 中的文件覆盖 "
  129. "<filename class=\"directory\">/usr/lib/tmpfiles.d</filename> 中的同名文件。参"
  130. "阅 <filename>tmpfiles.d(5)</filename> man 手册页面,了解配置文件格式的细节。"
  131. #. type: Content of: <sect1><sect2><para><screen>
  132. #, no-wrap
  133. msgid "q /tmp 1777 root root 10d"
  134. msgstr "q /tmp 1777 root root 10d"
  135. #. type: Content of: <sect1><sect2><para>
  136. msgid ""
  137. "Note that the syntax for the <filename>/usr/lib/tmpfiles.d/*.conf</filename> "
  138. "files can be confusing. For example, the default deletion of files in the /"
  139. "tmp directory is located in <filename>/usr/lib/tmpfiles.d/tmp.conf</"
  140. "filename> with the line: <placeholder type=\"screen\" id=\"0\"/> The type "
  141. "field, q, discusses creating a subvolume with quotas which is really only "
  142. "applicable to btrfs filesystems. It references type v which in turn "
  143. "references type d (directory). This then creates the specified directory if "
  144. "is is not present and adjusts the permissions and ownership as specified. "
  145. "Contents of the directory will be subject to time based cleanup if the age "
  146. "argument is specified."
  147. msgstr ""
  148. "注意 <filename>/usr/lib/tmpfiles.d/*.conf</filename> 文件的语法较难理解。例"
  149. "如,删除 /tmp 目录下文件的默认规则是文件 <filename>/usr/lib/tmpfiles.d/tmp."
  150. "conf</filename> 的一行:<placeholder type=\"screen\" id=\"0\"/> 类别字段 q 表"
  151. "示创建一个带有配额的子卷,它实际上只适用于 btrfs 文件系统。它引用类别 v,类"
  152. "别 v 又引用类别 d (目录)。对于类别 d,会在目录不存在时自动创建它,并根据配置"
  153. "文件调整其权限和所有者。如果 age 参数被指定,该目录中较老的文件会被自动清理。"
  154. #. type: Content of: <sect1><sect2><para><screen>
  155. #, no-wrap
  156. msgid ""
  157. "<userinput>mkdir -p /etc/tmpfiles.d\n"
  158. "cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d</userinput>"
  159. msgstr ""
  160. "<userinput>mkdir -p /etc/tmpfiles.d\n"
  161. "cp /usr/lib/tmpfiles.d/tmp.conf /etc/tmpfiles.d</userinput>"
  162. #. type: Content of: <sect1><sect2><para>
  163. msgid ""
  164. "If the default parameters are not desired, then the file should be copied to "
  165. "<filename class=\"directory\">/etc/tmpfiles.d</filename> and edited as "
  166. "desired. For example: <placeholder type=\"screen\" id=\"0\"/>"
  167. msgstr ""
  168. "如果默认参数不符合您的期望,您可以将文件复制到 <filename class=\"directory"
  169. "\">/etc/tmpfiles.d</filename> 目录,再编辑复制得到的副本。例如:<placeholder "
  170. "type=\"screen\" id=\"0\"/>"
  171. #. type: Content of: <sect1><sect2><title>
  172. msgid "Overriding Default Services Behavior"
  173. msgstr "覆盖系统服务默认行为"
  174. #. type: Content of: <sect1><sect2><para>
  175. msgid ""
  176. "The parameters of a unit can be overriden by creating a directory and a "
  177. "configuration file in <filename class=\"directory\">/etc/systemd/system</"
  178. "filename>. For example:"
  179. msgstr ""
  180. "Systemd 单元的参数可以通过在 <filename class=\"directory\">/etc/systemd/"
  181. "system</filename> 中创建一个包含配置文件的目录而覆盖。例如:"
  182. #. type: Content of: <sect1><sect2><screen>
  183. #, no-wrap
  184. msgid ""
  185. "<userinput>mkdir -pv /etc/systemd/system/foobar.service.d\n"
  186. "\n"
  187. "cat > /etc/systemd/system/foobar.service.d/foobar.conf &lt;&lt; EOF\n"
  188. "<literal>[Service]\n"
  189. "Restart=always\n"
  190. "RestartSec=30</literal>\n"
  191. "EOF</userinput>"
  192. msgstr ""
  193. "<userinput>mkdir -pv /etc/systemd/system/foobar.service.d\n"
  194. "\n"
  195. "cat > /etc/systemd/system/foobar.service.d/foobar.conf &lt;&lt; EOF\n"
  196. "<literal>[Service]\n"
  197. "Restart=always\n"
  198. "RestartSec=30</literal>\n"
  199. "EOF</userinput>"
  200. #. type: Content of: <sect1><sect2><para>
  201. msgid ""
  202. "See <filename>systemd.unit(5)</filename> manual page for more information. "
  203. "After creating the configuration file, run <userinput>systemctl daemon-"
  204. "reload</userinput> and <userinput>systemctl restart foobar</userinput> to "
  205. "activate the changes to a service."
  206. msgstr ""
  207. "参阅 <filename>systemd.unit(5)</filename> man 手册页面获取更多信息。在创建配"
  208. "置文件后,执行 <userinput>systemctl daemon-reload</userinput> 和 "
  209. "<userinput>systemctl restart foobar</userinput>,激活对服务进行的修改。"
  210. #. type: Content of: <sect1><sect2><title>
  211. msgid "Debugging the Boot Sequence"
  212. msgstr "调试引导过程"
  213. #. type: Content of: <sect1><sect2><para>
  214. msgid ""
  215. "Rather than plain shell scripts used in SysVinit or BSD style init systems, "
  216. "systemd uses a unified format for different types of startup files (or "
  217. "units). The command <command>systemctl</command> is used to enable, disable, "
  218. "control state, and obtain status of unit files. Here are some examples of "
  219. "frequently used commands:"
  220. msgstr ""
  221. "与 SysVinit 或 BSD 风格 init 系统不同,systemd 使用统一格式处理不同种类的引导"
  222. "文件 (或称为单元)。命令 <command>systemctl</command> 能够启用、禁用单元文件,"
  223. "或控制、查询单元文件的状态。以下是一些常用的命令:"
  224. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  225. msgid ""
  226. "<command>systemctl list-units -t <replaceable>&lt;service&gt;</replaceable> "
  227. "[--all]</command>: lists loaded unit files of type service."
  228. msgstr ""
  229. "<command>systemctl list-units -t <replaceable>&lt;service&gt;</replaceable> "
  230. "[--all]</command>: 列出已加载的服务 (service) 类型单元文件。"
  231. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  232. msgid ""
  233. "<command>systemctl list-units -t <replaceable>&lt;target&gt;</replaceable> "
  234. "[--all]</command>: lists loaded unit files of type target."
  235. msgstr ""
  236. "<command>systemctl list-units -t <replaceable>&lt;target&gt;</replaceable> "
  237. "[--all]</command>: 列出已加载的引导目标 (target) 类型单元文件。"
  238. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  239. msgid ""
  240. "<command>systemctl show -p Wants <replaceable>&lt;multi-user.target&gt;</"
  241. "replaceable></command>: shows all units that depend on the multi-user "
  242. "target. Targets are special unit files that are anogalous to runlevels under "
  243. "SysVinit."
  244. msgstr ""
  245. "<command>systemctl show -p Wants <replaceable>&lt;multi-user.target&gt;</"
  246. "replaceable></command>: 显示所有依赖于 multi-user 引导目标的单元,引导目标 "
  247. "(target)是一种和 SysVinit 中运行级别 (runlevel) 地位相同的特殊单元文件。"
  248. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  249. msgid ""
  250. "<command>systemctl status <replaceable>&lt;servicename.service&gt;</"
  251. "replaceable></command>: shows the status of the servicename service. The ."
  252. "service extension can be omitted if there are no other unit files with the "
  253. "same name, such as .socket files (which create a listening socket that "
  254. "provides similar functionality to inetd/xinetd)."
  255. msgstr ""
  256. "<command>systemctl status <replaceable>&lt;servicename.service&gt;</"
  257. "replaceable></command>: 显示名为 servicename 的服务的状态。如果没有同名的其他"
  258. "类型单元文件,可以省略 .service 后缀。其他类型的单元文件有 .socket 文件 (它创"
  259. "建一个监听套接字,提供和 inetd/xinetd 类似的功能)。"
  260. #. type: Content of: <sect1><sect2><title>
  261. msgid "Working with the Systemd Journal"
  262. msgstr "使用 systemd 日志"
  263. #. type: Content of: <sect1><sect2><para>
  264. msgid ""
  265. "Logging on a system booted with systemd is handled with systemd-journald (by "
  266. "default), rather than a typical unix syslog daemon. You can also add a "
  267. "normal syslog daemon and have both operate side by side if desired. The "
  268. "systemd-journald program stores journal entries in a binary format rather "
  269. "than a plain text log file. To assist with parsing the file, the command "
  270. "<command>journalctl</command> is provided. Here are some examples of "
  271. "frequently used commands:"
  272. msgstr ""
  273. "(默认情况下) 在使用 systemd 引导的系统上,systemd-journald 服务负责处理日志,"
  274. "它取代了传统的 Unix syslog 守护进程。如果您希望的话,也可以添加一个普通 "
  275. "syslog 守护进程,它和 systemd-journald 可以一起工作。systemd-journald 程序将"
  276. "日志项储存为二进制格式,而不是纯文本日志文件。为了解析日志文件,需要使用 "
  277. "systemd 提供的 <command>journalctl</command> 命令。下面是该命令的常见用法:"
  278. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  279. msgid ""
  280. "<command>journalctl -r</command>: shows all contents of the journal in "
  281. "reverse chronological order."
  282. msgstr "<command>journalctl -r</command>:按时间顺序,倒序显示所有日志内容。"
  283. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  284. msgid ""
  285. "<command>journalctl -u <replaceable>UNIT</replaceable></command>: shows the "
  286. "journal entries associated with the specified UNIT file."
  287. msgstr ""
  288. "<command>journalctl -u <replaceable>UNIT</replaceable></command>: 显示与给定"
  289. "单元文件 UNIT 关联的日志。"
  290. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  291. msgid ""
  292. "<command>journalctl -b[=ID] -r</command>: shows the journal entries since "
  293. "last successful boot (or for boot ID) in reverse chronological order."
  294. msgstr ""
  295. "<command>journalctl -b[=ID] -r</command>: 按时间倒序,显示自上次引导以来 (或"
  296. "编号为 ID 的引导中) 的所有日志。"
  297. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  298. msgid ""
  299. "<command>journalctl -f</command>: provides functionality similar to tail -f "
  300. "(follow)."
  301. msgstr ""
  302. "<command>journalctl -f</command>: 提供类似 tail -f 的功能 (不断将新日志项输出"
  303. "到屏幕)。"
  304. #. type: Content of: <sect1><sect2><title>
  305. msgid "Working with Core Dumps"
  306. msgstr "处理核心转储"
  307. #. type: Content of: <sect1><sect2><para>
  308. msgid ""
  309. "Core dumps are useful to debug crashed programs, especially when a daemon "
  310. "process crashes. On systemd booted systems the core dumping is handled by "
  311. "<command>systemd-coredump</command>. It will log the core dump in the "
  312. "journal and store the core dump itself in <filename class=\"directory\">/var/"
  313. "lib/systemd/coredump</filename>. To retrieve and process core dumps, the "
  314. "<command>coredumpctl</command> tool is provided. Here are some examples of "
  315. "frequently used commands:"
  316. msgstr ""
  317. "核心转储在调试崩溃的程序时非常有用,特别是对于守护进程崩溃的情况。在 systemd "
  318. "引导的系统上,核心转储由 <command>systemd-coredump</command> 处理。它会在日志"
  319. "中记录核心转储,并且将核心转储文件本身存储到 <filename class=\"directory\">/"
  320. "var/lib/systemd/coredump</filename> 中。如果要获取和处理核心转储文件,可以使"
  321. "用 <command>coredumpctl</command> 工具。下面给出它的常用命令的示例:"
  322. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  323. msgid ""
  324. "<command>coredumpctl -r</command>: lists all core dumps in reverse "
  325. "chronological order."
  326. msgstr ""
  327. "<command>coredumpctl -r</command>:按时间顺序,倒序显示所有核心转储记录。"
  328. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  329. msgid ""
  330. "<command>coredumpctl -1 info</command>: shows the information from the last "
  331. "core dump."
  332. msgstr "<command>coredumpctl -1 info</command>:显示最近一次核心转储的信息。"
  333. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  334. msgid ""
  335. "<command>coredumpctl -1 debug</command>: loads the last core dump into "
  336. "<ulink url=\"&blfs-book;general/gdb.html\">GDB</ulink>."
  337. msgstr ""
  338. "<command>coredumpctl -1 debug</command>:将最后一次核心转储加载到 <ulink url="
  339. "\"&blfs-book;general/gdb.html\">GDB</ulink> 中。"
  340. #. type: Content of: <sect1><sect2><para>
  341. msgid ""
  342. "Core dumps may use a lot of disk space. The maximum disk space used by core "
  343. "dumps can be limited by creating a configuration file in <filename class="
  344. "\"directory\">/etc/systemd/coredump.conf.d</filename>. For example:"
  345. msgstr ""
  346. "核心转储可能使用大量磁盘空间。为了限制核心转储使用的最大磁盘空间,可以在 "
  347. "<filename class=\"directory\">/etc/systemd/coredump.conf.d</filename> 中创建"
  348. "一个配置文件。例如:"
  349. #. type: Content of: <sect1><sect2><screen>
  350. #, no-wrap
  351. msgid ""
  352. "<userinput>mkdir -pv /etc/systemd/coredump.conf.d\n"
  353. "\n"
  354. "cat &gt; /etc/systemd/coredump.conf.d/maxuse.conf &lt;&lt; EOF\n"
  355. "<literal>[Coredump]\n"
  356. "MaxUse=5G</literal>\n"
  357. "EOF</userinput>"
  358. msgstr ""
  359. "<userinput>mkdir -pv /etc/systemd/coredump.conf.d\n"
  360. "\n"
  361. "cat &gt; /etc/systemd/coredump.conf.d/maxuse.conf &lt;&lt; EOF\n"
  362. "<literal>[Coredump]\n"
  363. "MaxUse=5G</literal>\n"
  364. "EOF</userinput>"
  365. #. type: Content of: <sect1><sect2><para>
  366. msgid ""
  367. "See the <filename>systemd-coredump(8)</filename>, <filename>coredumpctl(1)</"
  368. "filename>, and <filename>coredump.conf.d(5)</filename> manual pages for more "
  369. "information."
  370. msgstr ""
  371. "参阅 man 手册页面 <filename>systemd-coredump(8)</filename>,"
  372. "<filename>coredumpctl(1)</filename>,以及 <filename>coredump.conf.d(5)</"
  373. "filename> 了解更多信息。"
  374. #. type: Content of: <sect1><sect2><title>
  375. msgid "Long Running Processes"
  376. msgstr "持续运行进程"
  377. #. type: Content of: <sect1><sect2><para>
  378. msgid ""
  379. "Beginning with systemd-230, all user processes are killed when a user "
  380. "session is ended, even if nohup is used, or the process uses the "
  381. "<function>daemon()</function> or <function>setsid()</function> functions. "
  382. "This is a deliberate change from a historically permissive environment to a "
  383. "more restrictive one. The new behavior may cause issues if you depend on "
  384. "long running programs (e.g., <command>screen</command> or <command>tmux</"
  385. "command>) to remain active after ending your user session. There are three "
  386. "ways to enable lingering processes to remain after a user session is ended."
  387. msgstr ""
  388. "从 systemd 的 230 版本开始,在用户会话结束时,所有用户进程都被杀死,即使使用"
  389. "了 nohup 或 <function>daemon()</function> 、<function>setsid</function> 等函"
  390. "数也不例外。这是开发者有意做出的修改,将传统的宽松环境改为更加严格的环境。如"
  391. "果您需要让持续运行的程序 (例如 <command>screen</command> 或 <command>tmux</"
  392. "command>) 在用户会话结束后保持运行,这项新的行为会导致问题。有三种方法使得这"
  393. "类驻留进程在用户会话结束后继续运行:"
  394. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  395. msgid ""
  396. "<emphasis>Enable process lingering for only selected users</emphasis>: "
  397. "Normal users have permission to enable process lingering with the command "
  398. "<command>loginctl enable-linger</command> for their own user. System "
  399. "administrators can use the same command with a <parameter>user</parameter> "
  400. "argument to enable for a user. That user can then use the <command>systemd-"
  401. "run</command> command to start long running processes. For example: "
  402. "<command>systemd-run --scope --user /usr/bin/screen</command>. If you enable "
  403. "lingering for your user, the user@.service will remain even after all login "
  404. "sessions are closed, and will automatically start at system boot. This has "
  405. "the advantage of explicitly allowing and disallowing processes to run after "
  406. "the user session has ended, but breaks backwards compatibility with tools "
  407. "like <command>nohup</command> and utilities that use <function>daemon()</"
  408. "function>."
  409. msgstr ""
  410. "<emphasis>仅为选定的用户启用进程驻留</emphasis>:普通用户有执行命令 "
  411. "<command>loginctl enable-linger</command> 启用进程驻留的权限,管理员可以使用"
  412. "带 <parameter>user</parameter> 参数的该命令,为特定用户启用进程驻留。在启用进"
  413. "程驻留后,可以使用 <command>systemd-run</command> 命令启动持续运行的进程。例"
  414. "如,<command>systemd-run --scope --user /usr/bin/screen</command>。如果您为您"
  415. "的用户启用了进程驻留,则 user@.service 将持续运行,甚至在所有登录会话关闭后仍"
  416. "然运行,而且会在系统引导时自动启动。这种方法的好处是可以显式地允许或禁止进程"
  417. "在用户会话结束后继续运行,但却破坏了和 <command>nohup</command> 等工具,和使"
  418. "用 <function>daemon()</function> 函数的工具的兼容性。"
  419. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  420. msgid ""
  421. "<emphasis>Enable system-wide process lingering</emphasis>: You can set "
  422. "<parameter>KillUserProcesses=no</parameter> in <filename>/etc/systemd/logind."
  423. "conf</filename> to enable process lingering globally for all users. This has "
  424. "the benefit of leaving the old method available to all users at the expense "
  425. "of explicit control."
  426. msgstr ""
  427. "<emphasis>为整个系统启用进程驻留</emphasis>:您可以在将"
  428. "<parameter>KillUserProcesses=no</parameter> 设置行加入 <filename>/etc/"
  429. "systemd/logind.conf</filename>,为所有用户全局地启用进程驻留。它的好处是允许"
  430. "所有用户继续使用旧方法,但无法进行明确控制。"
  431. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  432. msgid ""
  433. "<emphasis>Disable at build-time</emphasis>: You can disable lingering by "
  434. "default while building systemd by adding the switch <parameter>-Ddefault-"
  435. "kill-user-processes=false</parameter> to the <command>meson</command> "
  436. "command for systemd. This completely disables the ability of systemd to kill "
  437. "user processes at session end."
  438. msgstr ""
  439. "<emphasis>在编译时禁用该功能</emphasis>:您可以在构建 systemd 时传递参数 "
  440. "<parameter>-Ddefault-kill-user-process=no</parameter> 给 <command>meson</"
  441. "command>,使得 systemd 默认启用进程驻留。这完全禁用了 systemd 在会话结束时杀"
  442. "死用户进程的功能。"