Understanding processes is essential for system administration. Every running program is a process, and Linux gives you powerful tools to manage them.
Viewing Processes
ps - Process Status
ps aux # All processes with details
ps -ef # Full format listing
ps aux | grep nginx # Find specific process
top and htop
top # Interactive process viewer
htop # Enhanced version (install separately)
Process Control
Background and Foreground
command & # Run in background
fg # Bring to foreground
bg # Resume in background
jobs # List background jobs
Signals
kill PID # Send TERM signal
kill -9 PID # Force kill (SIGKILL)
killall processname # Kill by name
pkill pattern # Kill by pattern
Process Priorities
nice -n 10 command # Start with lower priority
renice 15 PID # Change priority of running process
Systemd Services
Modern Linux uses systemd for service management:
systemctl status service # Check service status
systemctl start service # Start service
systemctl stop service # Stop service
systemctl restart service # Restart service
systemctl enable service # Enable on boot
Monitoring
# Watch process in real-time
watch -n 1 'ps aux | grep process'
# Monitor resource usage
iostat -x 1
vmstat 1
Understanding process management helps you troubleshoot issues and optimize system performance.