OS: Linux Process and System Monitoring

In Linux (and all operating systems), a process is simply a program in execution. When you run a command or start an application, the system loads the program’s code into memory and manages it as a process.

What is a Process?

Key Characteristics of a Process

  • PID (Process ID) → A unique number assigned to every process. Example: 1234.
  • Parent/Child → Processes are created by other processes. The original one is init (PID 1, usually systemd).
  • Resources → Each process uses CPU, memory, and I/O.
  • State → A process can be running, sleeping (waiting), stopped, or terminated.

Examples of Processes

  • When you open Firefox → a process is created (actually multiple).
  • When you run ls in the terminal → it becomes a short-lived process.
  • Background services (like networking, logging) → run as processes.

Viewing Processes

  • ps → snapshot of active processes.
  • ps aux

  • top → live view of running processes.
  • top

  • htop (if installed) → interactive process viewer.

Summary

  • process = a running program.
  • Identified by PID.
  • Can be managed (started, stopped, killed, put in background/foreground).
  • Processes are the building blocks of the Linux system — from desktop apps to hidden system services.