master
aldum 2 years ago
commit 8b1bd6470d

@ -0,0 +1,16 @@
| what to do/init system | systemd | openRC | runit | S6 |
|------------------------------|------------------------------------|------------------------------------------------------------------------------|-------|----|
| list services | `systemctl list-unit-files` | `rc-status` | | |
| list running services status | `systemctl list-units` | `rc-update show` | sv status | |
| list failed services | `systemctl --failed` | `rc-status --crashed` | | |
| list available services | `systemctl --all` | `rc-update -v show` or `ls /etc/init.d/` | `ls /etc/sv/` (list all enabled services: `ls /etc/run/service`)| |
| start a service | `systemctl start [SERVICE_NAME]` | `rc-service [SERVICE_NAME] start` or `/etc/init.d/[SERVICE_NAME] start` | `sv up [SERVICE_NAME]` or `sv u [SERVICE_NAME]` | |
| stop a service | `systemctl stop [SERVICE_NAME]` | `rc-service [SERVICE_NAME] stop` or `/etc/init.d/[SERVICE_NAME] stop` | `sv down [SERVICE_NAME]` or `sv d [SERVICE_NAME]` | |
| restart a service | `systemctl restart [SERVICE_NAME]` | `rc-service [SERVICE_NAME] restart` or `/etc/init.d/[SERVICE_NAME] restart` | `sv restart [SERVICE_NAME]` or `sv t [SERVICE_NAME]` | |
| get the status of a service | `systemctl status [SERVICE_NAME]` | `rc-service [SERVICE_NAME] status` or `/etc/init.d/[SERVICE_NAME] status` | `sv status [SERVICE_NAME]` or `sv s [SERVICE_NAME]` | |
| enable a service | `systemctl enable [SERVICE_NAME]` | `rc-update add [SERVICE_NAME]` | `ln -s /etc/sv/[SERVICE_NAME] /var/service` | |
| disable a service | `systemctl disable [SERVICE_NAME]` | `rc-update del [SERVICE_NAME]` | `rm /var/service/[SERVICE_NAME]` | |
> note, if you're an Artix user, available services are in `/etc/runit/sv` directory and the enabled services are in `/run/runit/service` directory
Loading…
Cancel
Save