systemd.syntax 文档
[root@rockylinux docs]# man systemd.syntax
SYSTEMD.SYNTAX(7) systemd.syntax SYSTEMD.SYNTAX(7)
NAME
systemd.syntax - General syntax of systemd configuration files
INTRODUCTION
This page describes the basic principles of configuration files used by systemd(1) and related programs for:
· systemd unit files, see systemd.unit(5), systemd.service(5), systemd.socket(5), systemd.device(5),
systemd.mount(5), systemd.automount(5), systemd.swap(5), systemd.target(5), systemd.path(5),
systemd.timer(5), systemd.slice(5), systemd.scope(5)
· daemon config files, see systemd-system.conf(5), systemd-user.conf(5), logind.conf(5), journald.conf(5),
journal-remote.conf(5), journal-upload.conf(5), systemd-sleep.conf(5), timesyncd.conf(5)
The syntax is inspired by XDG Desktop Entry Specification[1] .desktop files, which are in turn inspired by
Microsoft Windows .ini files.
Each file is a plain text file divided into sections, with configuration entries in the style key=value. Empty
lines and lines starting with "#" or ";" are ignored, which may be used for commenting.
Lines ending in a backslash are concatenated with the following line while reading and the backslash is
replaced by a space character. This may be used to wrap long lines. The limit on line length is very large
(currently 1 MB), but it is recommended to avoid such long lines and use multiple directives, variable
substitution, or other mechanism as appropriate for the given file type.
Example 1.
[Section A]
KeyOne=value 1
KeyTwo=value 2
# a comment
[Section B]
Setting="something" "some thing" "..."
KeyTwo=value 2 \
value 2 continued
Various settings are allowed to be specified more than once, in which case the interpretation depends on the
setting. Often, multiple settings form a list, and setting to an empty value "resets", which means that
previous assignments are ignored. When this is allowed, it is mentioned in the description of the setting.
Note that using multiple assignments to the same value makes the file incompatible with parsers for the XDG
.desktop file format.
NOTES
1. XDG Desktop Entry Specification
http://standards.freedesktop.org/desktop-entry-spec/latest/
systemd 239 SYSTEMD.SYNTAX(7)
本文由 lnlidawei 原创、整理、转载,本文来自于【博客园】; 整理和转载的文章的版权归属于【原创作者】; 转载或引用时请【保留文章的来源信息】:https://www.cnblogs.com/lnlidawei/p/15900808.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· AI与.NET技术实操系列(六):基于图像分类模型对图像进行分类