Processes · Lesson 1 of 11
ps (Processes)
0 / 4 checkpoints answered
A process is a running instance of a program, together with its memory, credentials, open resources, and execution state. Linux identifies each live process with a numeric process ID, or PID. A PID is unique among processes that exist at the same time, but the kernel can reuse it after a process exits.
Taking a Basic Snapshot
Run ps without options to see a snapshot selected by the implementation's defaults, commonly processes associated with your current terminal and user:
$ ps
PID TTY TIME CMD
41230 pts/4 00:00:00 bash
51224 pts/4 00:00:00 ps
Typical fields include:
PID: process IDTTY: controlling terminal, or?when none is associatedTIME: accumulated CPU time, not elapsed wall-clock durationCMD: command name or command line, depending on the selected format
Exact columns and selection defaults vary between ps implementations and environments.
CheckWhat does the PID column identify?
press 1/2/3 to answer · → next lesson
Listing Processes with BSD-Style Options
Linux ps accepts several option styles. BSD-style options are commonly written without a leading dash:
$ ps aux
In this combination:
aexpands selection to processes belonging to other users that have terminals.xalso includes processes without controlling terminals and broadens the selection when combined witha.uselects a user-oriented output format with fields such asUSER,%CPU,%MEM,VSZ, andRSS.
Because option meanings can interact, interpret the complete combination rather than treating every letter as an independent command.
CheckIn ps aux, which option requests the user-oriented output format?
press 1/2/3 to answer · → next lesson
Using Standard-Style Options
The widely used standard-style command ps -ef writes options with a leading dash:
$ ps -ef
-eselects every process visible to the caller.-frequests a full-format listing.
The output commonly includes UID, PID, PPID, start time, and command information. PPID is the parent process ID. This listing is not inherently hierarchical; use an option such as --forest where supported, or a dedicated tree viewer such as pstree, when parent-child layout matters.
CheckWhat does -e request in ps -ef?
press 1/2/3 to answer · → next lesson
Monitoring Activity over Time
ps exits after producing one snapshot. Use top for an interactive view that refreshes periodically:
$ top
top helps identify changing CPU and memory consumers, but its values are samples and can fluctuate. Confirm a suspected problem across multiple observations and relate percentages to the machine's CPU count, memory accounting, and workload.
CheckWhich tool introduced here refreshes its process display periodically by default?
press 1/2/3 to answer · → next lesson
For hands-on practice, use Manage and Monitor Linux Processes to compare snapshots with an interactive monitor, or explore sorting and filtering in the Linux top Command lab.
Summary
You can now choose a process view and interpret its basic identifiers.
- Treat a PID as a reusable identifier for a currently live process.
- Use plain
psfor a small default snapshot. - Use
ps auxorps -effor broader selections and richer columns. - Use
topwhen changes over time matter.
Lesson complete
You finished ps (Processes). Nice work — keep the momentum going.