迷你 systemd 命令速查表
如果我的 systemd 服务文件放在 /etc/systemd/system/myservice.service,这些是我使用的最常见命令。
启用(即开机启动)并立即启动服务(--now):
example-7.sh
启动使用
example-6.sh
重启使用
example-5.sh
停止使用
example-4.sh
查看状态:
example-3.sh
查看并跟踪日志:
example-2.sh
在 less 中查看日志:
example-1.sh
Check out similar posts by category:
Linux
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow