linux · medium
Processes & Signals — ps, kill, jobs, systemctl
Process & signal basics: ps -ef vs ps aux (and Z=zombie); SIGTERM (clean, catchable) vs SIGKILL (uncatchable, skips cleanup) plus HUP/USR1; and systemctl + journalctl for real services instead of nohup.
🔑 Key line
ps -ef (PPID) / ps aux (%CPU,STAT; Z=zombie). Signals: TERM(15) clean+catchable, KILL(9) uncatchable last-resort, HUP reload, USR1 app-defined. Real services: systemctl + journalctl -u -f.
The code
ps -ef # every process + parent PID (PPID)ps aux # %CPU %MEM RSS STAT
kill -TERM 1234 # 15: polite, catchable -> clean shutdown (default)kill -HUP 1234 # 1: reload config (by convention)kill -USR1 1234 # 10: app-defined (e.g. bump log level)kill -KILL 1234 # 9: uncatchable last resort -- NO cleanup
systemctl restart myapp ; journalctl -u myapp -fWhat this lesson walks through
- 01List processes — and spot a zombie
- 02The signals that matter
- 03Real services use systemd
ps aux / ps -ef list processes; STAT 'Z' (zombie) means the child exited but the parent never wait()ed for it.
See it animated — step by step, at your own pace
Unlock the full interactive walkthrough of Processes & Signals — ps, kill, jobs, systemctl and 100+ animated C++ interview lessons.