为什么此 systemd 单元文件会生成错误“服务的单元文件设置错误”?

bba*_*ker 6 systemd

我正在尝试编写一个用户服务:

$ systemctl --user start valheim.service
Failed to start valheim.service: Unit valheim.service has a bad unit file setting.
See user logs and 'systemctl --user status valheim.service' for details.
Run Code Online (Sandbox Code Playgroud)

我稍微最小化了它,结果出现了同样的错误:

[Unit]
Description=Valheim Server
After=multi-user.target

[Service]
RemainAfterExit=True
ExecStart = /bin/ls

[Install]
WantedBy=default.target
Run Code Online (Sandbox Code Playgroud)

不幸的是,由于这个问题,我目前似乎无法使用systemctl status来进一步诊断。

Ste*_*itt 6

您需要删除周围的空格=

ExecStart=/bin/ls
Run Code Online (Sandbox Code Playgroud)