How to See Running Processes in Linux

Use ps to inspect running processes, PIDs, users and commands.

Process inspection is the first step before stopping a program, diagnosing high CPU usage or finding which user owns a service. `ps` gives you a stable snapshot you can pipe into other tools.

Step by step

1 List processes

$ ps aux

Shows processes for all users with CPU, memory, PID and command information.

2 Find one program

$ ps aux | grep nginx

Filters the snapshot for a program name. Verify the result before acting on the PID.

3 Inspect one PID

$ ps -fp 12345

Shows a focused row with user, parent PID, start time and command.

4 Show a process tree

$ ps -ef --forest

Displays parent/child relationships, which helps explain how a process was launched.

Tips worth knowing

Frequently asked questions

How do I list all running processes?

Use `ps aux` or `ps -ef`.

How do I find a process by name?

Use `pgrep -af name` or filter `ps` output.

How do I see who owns a process?

The user column in `ps aux` shows the process owner.

The commands behind it

ps

See what is running, find a process ID, and combine with grep to hunt down a program.

top & htop

The live dashboard: CPU, memory, load average and the processes consuming them.

kill

Terminate processes politely or forcibly — and understand what -9 really does.

Concepts involved: Process · PID (Process ID)

More how-to guides

Check disk space in Linux

See how much space is left, and find out what is using it.

Extract a .tar.gz archive

Unpack tar.gz, tar.bz2, tar.xz and zip archives from the command line.

Free a port that is already in use

Find which process holds a port and stop it cleanly.

Find and replace text in files

Replace text in one file or across a whole project, safely.