The ps Command
In this page:
The ps Command
ps lists currently running processes, showing information like process ID (PID), status, and the command that started them. ps aux is a common invocation showing all processes for all users with detailed columns. It's the primary tool for inspecting what's running on a system.
Note: Pipe ps aux into grep to find a specific process by name, e.g. ps aux | grep myscript.
Example: The ps Command
#!/bin/bash
echo "Current shell's PID: $$"
ps -p $$
Login to try C/C++/Java/PHP code in the editor
🔒
Chapter Quiz — Complete all 12 topics to unlock
0/12 topics done
Complete these topics first: