The ps command in Linux: listing running processes
In Unix-like operating systems, especially Linux, managing and monitoring running processes is a fundamental task for any system administrator or developer. The ps (process status) command allows obtaining a snapshot of active processes, showing information such as the process ID (PID), the owning user, CPU and memory consumption, and the command that started them. Unlike interactive tools like top or htop, ps is non-interactive and can be used in scripts, pipelines, and combinations with other commands to filter, format, and analyze system state quickly and efficiently.
What is ps?
The name ps comes from “process status”. Its main function is to read the kernel’s process table and present the data in a readable format. Depending on the options provided, it can show anything from a basic summary to an exhaustive detail of each thread and associated resources. It is one of the oldest utilities in Unix systems and remains relevant thanks to its simplicity and power.
Basic syntax
The simplest way to invoke ps is without arguments, which shows the processes associated with the current terminal:
ps
To obtain a broader view, options that modify the output behavior are usually added. Options can be combined without additional hyphens, although it is also possible to use GNU-style syntax with double hyphens.
Most used options
-a: shows all processes with an associated terminal, except session leaders and processes not associated with a terminal.-u: presents the output in user-oriented format,
This post is also available in ESPAÑOL.