Process Basics
What is a Process?
In Linux, a process is an instance of a running program. When you launch an application or execute a command, the system creates a process with a unique Process ID (PID). Each process represents a set of instructions being executed by the system's CPU.
Process Lifecycle
stateDiagram-v2
[*] --> Created
Created --> Ready
Ready --> Running
Running --> Waiting
Waiting --> Ready
Running --> Terminated
Terminated --> [*]
Key Process Attributes
Attribute |
Description |
PID |
Unique Identifier |
PPID |
Parent Process ID |
User |
Owner of the Process |
State |
Current Execution Status |
Memory Usage |
RAM Consumption |
Basic Process States
- Running: Active execution
- Sleeping: Waiting for resource
- Stopped: Suspended by signal
- Zombie: Completed but not cleaned up
Most Linux users can access basic process information using:
ps aux ## Detailed process list
ps -ef ## Alternative format
top ## Real-time process monitor
Process Hierarchy
In Linux, all processes originate from the init
process (PID 1), creating a parent-child relationship. Understanding this hierarchy helps in system management and troubleshooting.
At LabEx, we recommend exploring process management as a fundamental Linux skill for system administrators and developers.