CLI:Basics Process Management – PS, Kill, Top, and HTOP
In this part of the CLI:Basics series, we’re tackling process management — learning how to view, control, and manage running tasks on your Linux system.
Whether you’re dealing with frozen apps or just checking system health, these commands are essential Linux skills.
Here’s what we covered:
🧠 Viewing Processes with ps
- Show processes for current user:
ps
- Show all processes:
ps aux
Tip:
ps
alone shows only your current session’s tasks.ps aux
lists everything your user is running — useful when diagnosing issues.
🔫 Terminating Processes with kill
- Find a process ID (PID) using
ps
orhtop
- Gently request a process to terminate:
kill PID
- Forcefully kill a stubborn process:
kill -9 PID
Reminder:
Use kill -9
carefully — it force-closes without giving the application a chance to save.
📈 Monitoring with top
- Run real-time system monitor:
top
- Shows:
- CPU and memory usage
- Uptime and load averages
- Active processes sorted by resource consumption
🎨 A Better Monitor: htop
- Install (if needed):
sudo apt install htop
- Run htop:
htop
Advantages of htop
:
- Color-coded and easier to read
- Navigate with arrow keys
- Kill processes with simple keyboard shortcuts (like F9)
- Toggle tree view with F5
- Search running processes with F3
Final Thoughts
You now know how to:
- View active processes
- Kill misbehaving programs
- Monitor your system’s health
All directly from the Linux command line.
Linux gives you full control — process management lets you take action when things go wrong.
We’re almost at the end of the CLI:Basics series!
Stay tuned for the final video — and if you’re feeling confident, CLI:Advanced is right around the corner.
👉 Like, subscribe, and hit that notification bell — and drop a comment if you’ve ever had to nuke a stubborn app with kill -9
!