#1 楼
对于在实际的静态文件中定义的单位,可以在systemctl status
中看到:$ systemctl status halt-local.service
● halt-local.service - /usr/sbin/halt.local Compatibility
Loaded: loaded (/lib/systemd/system/halt-local.service; static)
Active: inactive (dead)
,但是有些文件没有定义文件,例如安装了
systemd-cron
。这些没有在status
中列出的有用位置:$ systemctl status cron-jojo-0.timer
● cron-jojo-0.timer - [Cron] "*/10 * * * * ..."
Loaded: loaded (/var/spool/cron/crontabs/jojo)
Active: active (waiting) since Mon 2015-05-18 14:53:01 UTC; 9min ago
无论哪种情况,
FragmentPath
字段都在教育:$ systemctl show -p FragmentPath cron-daily.service
FragmentPath=/lib/systemd/system/cron-daily.service
$ systemctl show -p FragmentPath cron-jojo-0.service
FragmentPath=/run/systemd/generator/cron-jojo-0.service
$ systemctl show -p FragmentPath halt-local.service
FragmentPath=/lib/systemd/system/halt-local.service
评论
遮罩服务的路径如何? (并非所有人都在/ lib / systemd / system或/ usr / lib / systemd / system中)
–desgua
20-10-31在15:28