Linux Process Management
Learn to monitor, control, and manage processes in Linux. A process is simply a running program — every command you type, every service running on your server, every background task is a process. Understanding processes is like understanding traffic flow in a city: you need to know what is running, what is stuck, and how to clear a jam.Viewing Processes
Signals and Process Control
Killing a process is not always about force — Linux uses signals to communicate with processes. Think of signals as tapping someone on the shoulder (polite) versus pulling the fire alarm (forceful).Common Signals Reference
Background and Foreground Jobs
When you are working in a terminal, you often need to run something in the background while continuing other work. This is job control.Systemd Services
Modern Linux distributions use systemd to manage services (daemons). Systemd is the first process that starts (PID 1) and it manages the lifecycle of everything else. Think of it as the conductor of an orchestra — it starts services in the right order, restarts them if they crash, and tracks their logs.Creating a Custom Service
When you deploy your own application, you write a unit file to let systemd manage it. This is one of the most practical skills in this chapter — every production application should be managed by systemd rather than run manually in ascreen or tmux session.
Key Takeaways
- Every running program is a process with a PID, owner, and resource usage
- Use
htopfor interactive monitoring,ps auxfor scripting - Send SIGTERM first, SIGKILL only as a last resort
- Job control (
&,fg,bg,Ctrl+Z) manages processes within your terminal session - Systemd manages long-running services: start, stop, restart, and auto-start on boot
- Always check
systemctl statusandjournalctl -uwhen debugging service failures - Write custom unit files to let systemd manage your own applications
Next: Linux Networking →