Abstract
- A Process (进程) that runs in the background
- Most important Process (进程) with Process IDentifier (PID) 1
- Manages the lifecycle of all services that run in the background
- Below shows a list of common init systems. Basically Systemd for Linux Kernel, Launchd for MacOS and busybox for for Embedded OS like OpenWRT
Something simpler
If you just want to run a task in the background after the user logs out, you can just run
nohup <command> &
, the standard output and standard error streams are redirected to a file namednohup.out
in the current directory by default. But this doesn’t restart the service on failure or after a reboot etc.