Linux Process Management - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux Process Management Guide
Complete beginner-friendly guide to process management on Linux, covering Arch Linux, CachyOS, and other distributions including viewing processes, managing processes, process priorities, and resource monitoring.
Table of Contents
Viewing Processes
ps Command
List processes:
# All processes
ps aux
# Tree view
ps auxf
# Specific user
ps -u username
# By command
ps aux | grep firefox
See PS Process Management for detailed guide.
top Command
Interactive process viewer:
# Launch top
top
# Sort by CPU: Press P
# Sort by memory: Press M
# Kill process: Press k
See Free & Top Resource Monitoring for detailed guide.
htop
Better top:
# Install htop
sudo pacman -S htop
# Launch
htop
Managing Processes
Kill Process
Kill by PID:
# Kill process
kill PID
# Force kill
kill -9 PID
# Kill by name
pkill process-name
# Force kill by name
killall -9 process-name
systemctl
Manage services:
# Stop service
sudo systemctl stop service-name
# Kill service
sudo systemctl kill service-name
Process Priorities
nice
Set priority:
# Run with low priority
nice -n 19 command
# Run with high priority
nice -n -20 command
renice
Change priority:
# Change priority
sudo renice -n 10 -p PID
# Change for user
sudo renice -n 10 -u username
Resource Monitoring
Monitor Resources
Check resources:
# CPU and memory
top
# Memory
free -h
# Disk I/O
iostat
# Network
iftop
Troubleshooting
High CPU Usage
Find CPU hogs:
# Sort by CPU
top -o %CPU
# Or
ps aux --sort=-%cpu | head
High Memory Usage
Find memory hogs:
# Sort by memory
top -o %MEM
# Or
ps aux --sort=-%mem | head
Summary
This guide covered process management for Arch Linux, CachyOS, and other distributions, including viewing, managing, priorities, and monitoring.
Next Steps
- PS Process Management - ps command guide
- Free & Top Resource Monitoring - Resource monitoring
- System Monitoring - System monitoring
- ArchWiki Process Management: https://wiki.archlinux.org/title/Process_management
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.