How to List All Running Processes in Linux
Learn how to list Linux processes with ps, read fields such as PID and %CPU, compare ps -A with ps aux, and monitor activity with top.
What Is a Linux Process?
A process is an actively executing instance of a program managed by the Linux kernel. A program is a set of instructions stored on disk, such as an executable file or a script. A process is what exists after Linux loads those instructions into memory and begins executing them.
One program can create multiple processes. Each process has a numeric PID, or Process ID, assigned by the kernel. Process information can also include its owner, resource usage, start time, and relationship to other processes.
Processes commonly have parent-child relationships. The process that starts another process is its parent, and its identifier is recorded as the PPID, or Parent Process ID. For example, a shell can start a text editor, making the shell the editor's parent process.
A background service is often called a daemon. Daemons usually run without an interactive terminal, so they are important when listing every process on a system.
Introduction to the ps Command
ps is commonly associated with process status. It reports a snapshot: a static view of selected process information at the instant the command runs. It does not continuously refresh its output.
Run ps without options to see processes associated with the current terminal session or shell context:
psThis default list is intentionally limited. It normally shows commands started from the current shell or terminal, not every process running on the machine.
List Every Process on the System
Use ps -A to select all processes:
ps -AThe result includes processes belonging to other users as well as system services. The equivalent all-process selection form ps -e is also widely used:
ps -eThe output from these commands is usually concise. That makes it useful for quickly confirming that a process exists, but it may not provide ownership, resource, or full command details.
Use the Common ps aux Form
Linux systems accept several ps option styles. Unix-style options commonly use a hyphen, as in ps -A. BSD-style options commonly appear without a hyphen, as in ps aux.
ps auxThis is a common detailed process listing. Its options mean:
| Option | Option style | Effect |
a | BSD-style, no hyphen | Include processes associated with terminals for users other than the current user. |
u | BSD-style, no hyphen | Use a user-oriented format with fields such as owner, CPU, memory, and start information. |
x | BSD-style, no hyphen | Include processes without a controlling terminal. |
Together, ps aux gives a detailed, system-wide view that includes terminal-based processes and background processes.
Read ps Output
The exact columns can vary by operating system and option set. A detailed listing commonly includes the following fields.
| Field | Meaning | Why it matters |
USER | The account that owns the process. | Helps identify who started or controls the process. |
PID | Process ID, a numeric identifier assigned to the process. | Use it to identify a particular process when inspecting or managing it. |
PPID | Parent Process ID: the ID of the process that started this process. | Helps trace parent-child relationships and understand how a process was launched. |
%CPU | An indicator of the processor usage attributed to the process. | Useful for spotting CPU-intensive processes, but it is a measurement convention rather than a complete performance analysis. |
%MEM | An indicator of the process's memory use relative to system memory. | Useful for finding processes associated with high memory usage. |
VSZ | Virtual memory size associated with the process, usually shown in kilobytes. | Shows the process's virtual address-space footprint, which is not the same as physical RAM currently used. |
RSS | Resident Set Size: memory pages currently held in physical RAM, usually shown in kilobytes. | Provides a closer indication of physical memory occupancy than VSZ, although shared memory affects interpretation. |
TTY | The terminal associated with the process. | Shows whether the process is tied to an interactive terminal. |
STAT | A compact process-state and status code. | Can indicate whether a process is running, sleeping, stopped, or has other status flags. |
START | The time or date when the process started. | Helps determine how long the process has existed. |
TIME | Cumulative CPU time consumed by the process. | Measures processor time used, not the total time elapsed since startup. |
COMMAND | The command or executable associated with the process. | Identifies what the process is running; arguments may also appear. |
PID and PPID
The PID is the main identifier for a process. When investigating a particular application, first find its PID, then use that identifier with other inspection or process-management commands.
PPID provides context. If an unexpected process is present, its parent can help explain whether it was started by a shell, a service manager, or another application.
CPU, Memory, and Time Fields
%CPU and %MEM are useful indicators during troubleshooting, but they are not always a complete account of resource consumption. Shared libraries, multiple threads, sampling intervals, and the operating system's accounting method can affect how the values should be interpreted.
START describes when a process began. TIME is cumulative CPU time: the amount of processor time the process has consumed. A process may have started several days ago while having accumulated only a small amount of CPU time.
TTY and the Question Mark
A controlling terminal is the terminal session associated with an interactive process, if one exists. The TTY column identifies that terminal.
A question mark in TTY means the process has no controlling terminal. This is normal for many daemons, scheduled jobs, and other background processes. The x option in ps aux helps include these processes.
Choose the Right Listing Command
| Command | Scope | Detail level | Best use case |
ps | Processes associated with the current terminal context. | Concise. | Quickly view commands started from the current shell. |
ps -A | All processes on the system. | Concise. | Confirm that a process or service exists system-wide. |
ps -e | All processes on the system. | Concise. | Use the alternative all-process selection syntax. |
ps aux | All users' processes, including processes without terminals. | Detailed and user-oriented. | Investigate ownership, CPU, memory, terminal, and command information. |
top | System processes and resource activity. | Continuously updated and interactive. | Watch CPU or memory usage as it changes over time. |
Use ps -A when a concise system-wide list is sufficient. Use ps aux when troubleshooting requires ownership and resource information. Start with plain ps only when the current terminal context is the intended scope.
Monitor Processes Live with top
top is an interactive command that repeatedly refreshes system and process information:
topUnlike ps, which returns one snapshot, top shows how process activity changes. It is preferable when CPU or memory use varies over time, or when you need to observe which process is currently consuming resources.
Troubleshooting Common Listing Problems
A Known Service Does Not Appear in ps
Plain ps usually limits its results to the current terminal context. A service started elsewhere may therefore be absent.
ps -AFor ownership and resource details, use:
ps auxA Process Shows ? in the TTY Column
This normally means the process has no controlling terminal. It is expected for many daemons and background jobs, not necessarily an error.
Use ps aux when you need a system-wide listing that includes processes without terminals.
CPU Usage Changes Between ps Runs
Each invocation of ps produces a separate snapshot. Values can differ because process activity changes between commands.
Use top for a continuously refreshed view:
topUncertainty About ps aux and ps -aux
The command supports multiple option conventions, and hyphenated and non-hyphenated forms can have different interpretations. Use the standard BSD-style form ps aux for the all-users, user-format, no-terminal combination.
Practical Workflow
- Run
pswhen checking commands launched from the current shell. - Run
ps -Awhen you need a concise list of every process. - Run
ps auxwhen you need users, CPU, memory, terminal, and command details. - Note the PID of a process that requires further inspection.
- Run
topwhen a single snapshot is not enough and activity must be observed over time.
Summary
- A process is a running instance of a program, with information such as a PID, owner, resource usage, start time, and parent relationship.
psmeans process status and provides a point-in-time snapshot.- Plain
psnormally shows processes associated with the current terminal context. ps -Aandps -eselect all processes on the system.ps auxprovides a detailed BSD-style listing for processes across users, including processes without terminals.topis better thanpsfor observing changing resource usage.
For related Linux command-line foundations, see Linux tutorials and Bourne Again Shell Bash.