Service and Process Management
Services and processes are background workloads controlled with systemd, signals, and job control.
Overview
- Services can be started, stopped, restarted, enabled, and inspected
- Processes are identified by PIDs and may have parent processes
- Job control and command chaining are common shell workflows
Reference
systemctl
start,stop,restart, andstatuscontrol service stateenablemakes a service start at bootsystemctl list-units --type=serviceshows active services
systemctl list-units --type=serviceProcess control
- Common states: running, waiting, stopped, zombie
kill,pkill,pgrep, andkillallsend signals or locate processeskill -llists available signals
Job control
Ctrl+Zsuspends the current jobjobslists suspended or background jobsbgresumes a job in the backgroundfg <id>returns a job to the foreground&runs a command in the background immediately
Command chaining
;runs commands sequentially&&runs the next command only on success|sends stdout from one command to the next
Mental Model
systemdmanages service lifecycle on most modern distributions- PIDs identify running processes and
/procexposes process details - Signals request state changes; jobs manage interactive shell work
- Simple commands become more powerful when chained together