Linux for Developers Course
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 / OptionDescription
-e / -ASelect all processes.
-fDo 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?

Flash Cards

Question

What is aux?

Click to reveal answer
Answer

`a` shows processes for all users, `u` displays the user/owner and memory details, and `x` shows processes not attached to a terminal (background daemons).

Question

Show live CPU?

Click to reveal answer
Answer

No. `ps` is a static snapshot of the exact millisecond you hit Enter. To see live, fluctuating CPU usage, you must use `top` or `htop`.