Lesson 6 - Processes

Progress 0%

Interactive Terminal Sim:

What is a Process?

Every program running on a Linux computer — from your web browser to the system services quietly running in the background — is a process. Each process has a unique number called a PID (Process ID), which the system uses to keep track of it.

Understanding processes lets you see what your computer is actually doing, and lets you step in when something is using too many resources or has stopped responding.

Viewing Processes with ps

The ps command prints a snapshot of currently running processes:

ps

By default this only shows processes belonging to you. To see every process running on the whole system, including background services owned by other users like root, add the -e option:

ps -e

Each row shows the process's PID, the user who owns it, and the command that started it.

Real-Time Monitoring with top

While ps shows a single snapshot, top gives you a live, constantly updating view of every process along with how much CPU and memory each one is using:

top

This is one of the first tools system administrators reach for when a machine feels slow — it quickly shows which process is using the most resources.

Managing Processes

Sometimes a process running in your terminal needs to be paused or stopped. If a process is running in the foreground, pressing Ctrl+Z pauses it and hands control back to your shell, without ending it completely.

To stop a process entirely, use kill together with its PID:

kill 734

This sends a signal asking the process to shut down. Combine it with ps or ps -e to first find the PID of the process you want to stop.


With ps, top, kill and Ctrl+Z, you now have the tools to see what your Linux system is doing at any moment, and to step in when something needs your attention.