Linux for Developers
/Beginner
ps
Definition
Process Status. A command that provides a snapshot of the current running processes on the system.
Explain Like I'm New
Taking a photograph of the Task Manager. It lists all the invisible background apps currently running, but it doesn't update live.
Real World Example
You start a Node.js server in the background and forget its Process ID. You type `ps aux | grep node`. It outputs the exact Process ID (e.g., 4598) so you can kill it.
Common Use Cases
- •Finding Process IDs (PIDs)
- •Checking if a service is running
Crucial Command Flags
| Flag / Option | Description |
|---|---|
| -e / -A | Select all processes. |
| -f | Do full-format listing (shows UID, PID, PPID, C, STIME, TTY, TIME, CMD). |
| -u [user] | Select processes by specific user. |
Interview Questions
basic
- What do the flags `aux` do in the extremely common command `ps aux`?
intermediate
- Does the `ps` command show you how much CPU a process is using right this exact second?