Tag: systemd

Linux Process Management: ps, top, kill, jobs, cron, nice

Working reference for Linux process management. ps aux vs ps -ef and the sort flags (--sort=-%mem / -%cpu), interactive viewers (top with P/M/k shortcuts, htop, btop), pstree for hierarchy, the seven signals you actually need (SIGHUP/INT/QUIT/TERM/KILL/STOP/CONT) and why SIGTERM-first-then-SIGKILL beats SIGKILL alone, killall vs pkill, foreground/background job control with & / fg / bg / disown / nohup vs the modern tmux alternative for survive-logout sessions, cron 5-field syntax with the full-paths gotcha, at for one-shots, systemd timers as the modern replacement, nice / renice / ionice for priority (counter-intuitive higher-number-equals-lower-priority). Pitfalls: SIGKILL too soon, cron silent failures, nohup doesn't imply background, parent-kill doesn't reap children.