Every process has a unique PID (Process ID). The very first process at boot is usually init
with PID 1. Processes may create child processes, forming a parent-child hierarchy. The Linux kernel maintains process information such as memory usage, CPU state, and user ownership.
ps
ps # Attached to current terminal
ps x # User-owned processes, including daemons
ps aux # All system processes with full details
Key Columns:
top
top
Displays real-time process data, sorted by CPU usage. Summary includes:
Press h
for help, q
to quit.
xlogo & # Run process in background
fg %1 # Bring job 1 to foreground
Ctrl+Z # Suspend foreground process
bg %1 # Resume job 1 in background
jobs # List background jobs
kill
and killall
kill 28401 # Send SIGTERM to PID
kill -9 28401 # Force kill with SIGKILL
killall xlogo # Kill all processes named xlogo
shutdown -r now # Reboot immediately
poweroff # Power down system
reboot # Restart system
Proper shutdown prevents data loss and ensures filesystem integrity.
Command | Description |
---|---|
pstree | Visual tree of process hierarchy |
vmstat 5 | Updates system stats every 5 seconds |
tload | Text graph of system load |
xload | Graphical CPU load monitor |
Linux provides comprehensive tools to monitor and manage processes. From listing with ps
and top
to controlling jobs and sending signals via kill
, users can fine-tune system performance and troubleshoot efficiently. Understanding process control boosts your confidence and skill as a Linux power user.