The ps command is essential for monitoring running processes on Linux. In this video, we’ll cover everything from basic usage to advanced filtering and sorting techniques. Learn how to identify resource-heavy programs, troubleshoot performance issues, and visualize process hierarchies—perfect for system administrators and developers who want to understand what’s happening under the hood of their Linux system.
Learn:
✅ Step-by-Step Guide:
Basic Process View:
ps
Shows processes associated with your current terminal session.
Detailed Process Information:
ps aux
a: All users’ processes
u: User-friendly format
x: Include non-terminal processes
Filter by Process Name:
ps aux | grep firefox
Filters output to show only processes containing "firefox".
Sort by Resource Usage:
Sort by memory consumption (descending)
ps aux --sort=-%mem
Sort by CPU usage (descending)
ps aux --sort=-%cpu
The - sign sorts in descending order (highest first).
View Process Hierarchy:
ps auxf
Displays parent-child relationships in a tree-like format.
✅ Summary Table:
ps View basic processes
ps aux Detailed process info
ps aux | grep name Filter by process name
ps aux --sort=-%mem Sort by memory usage
ps aux --sort=-%cpu Sort by CPU usage
ps auxf Show process tree
✅ Why Use the PS Command?
System Monitoring: Track resource usage and identify bottlenecks.
Troubleshooting: Find problematic processes causing slowdowns.
Process Management: Understand system behavior and dependencies.
✅ Pro Tips:
Combine ps with grep for quick searches.
Use --sort to identify top resource consumers.
Remember auxf for understanding process relationships.
auxf show process tree conflich with --sort (don't use both in the same command ; will output unexpected results)
You can find more information about the ps command and its options in the official documentation: man ps.
You can find a comprehensive PDF tutorial and examples for the ps command at this GitLab link: https://gitlab.com/hatem-badawi/linux...
Hit subscribe for more Linux system administration tips and like if this helped.
Let us know: Which ps command variation do you use most often?
👉 Watch now and take control of your Linux processes!
#LinuxTips #PSCommand #SystemMonitoring #ProcessManagement #TerminalTips
(Short, clear, and packed with practical knowledge!)