How to List Running Processes in Linux? (Linux Process List)

Every time you open an application or run a command in Linux—whether it’s a browser, code editor, or music player—a new process is created. Thanks to Linux’s multitasking capabilities, multiple programs can run at the same time without interrupting each other. To take full control of your system, it’s essential to understand how to view and manage these active processes.

This detailed guide on listing running processes in Linux shows you how to use command-line tools effectively, interpret the outputs, and optimize your system management with practical techniques.

Understanding of Linux Process List

A process is a running instance of a program, either from an application or a terminal command. For example, opening Visual Studio Code starts a process that continues until you close the app. Similarly, running a command in the terminal creates a process that ends when the command completes or is stopped.

View Linux Process List with the ps Command (Linux List Running Processes)

In Linux, you can see the active processes using the ps command, which stands for process status. This command shows the processes currently running in your system.

To get started, open your terminal and type:

ps

This will display processes for your current shell, typically showing four main columns:

  • PID – the unique ID of the process

  • TTY – the terminal type you are logged into

  • TIME – the total CPU time used by the process

  • CMD – the command that started the process

Filtering Processes (Filter from Linux Process List)

The ps command supports a variety of options to filter and customize the output. Common options include -A, -a, -C, -c, -d, -E, -e, -u, -X, -x, among others. You can combine multiple options, and ps will show all processes that match any of the specified criteria.

To explore all options in detail, you can check the manual by running:

man ps

List Running Processes (Linux Show Running Processes)

If you want to see all running processes on the system, including those from other users and those not attached to your terminal, use:

ps aux

Here’s what the options mean:

  • a – shows processes of all users, not just your own

  • u – displays the username associated with each process

  • x – includes processes that don’t have a controlling terminal

The output typically has these columns:

  • USER – the username running the process

  • PID – process ID

  • %CPU – CPU usage percentage

  • %MEM – memory usage percentage

  • VSZ – virtual memory size (in KB)

  • RSS – resident memory size

  • TT – controlling terminal

  • STAT – process state

  • STARTED – process start time

  • CMD – command that started the process

With ps, you can quickly get a snapshot of system activity and understand which processes are consuming resources, making it an essential tool for system management.

Linux List Processes: Show Running Processes with Linux top Command

The top command provides a real-time view of system processes, allowing you to monitor CPU and memory usage continuously. Unlike the static ps command, top refreshes automatically, giving an up-to-date snapshot of resource consumption and system performance.

By default, the top command in Linux process list sorts by CPU usage, showing the most resource-intensive processes at the top. To try it out, simply open your terminal and type:

top

Interacting with Processes

The top command also lets you interact with running processes using keyboard shortcuts:

  • k – kill a process

  • r – change a process’s priority

  • m – sort processes by memory usage

  • n – sort processes by PID

  • d – modify the refresh interval

  • h – display the help screen

  • c – show the full command path of a process

  • z – toggle color mode for easier visualization

Note: These commands are case-sensitive, so make sure Caps Lock is off

To exit top, simply press q.

List Running Processes Using the Linux htop Command

The htop command is an interactive and user-friendly alternative to top, offering a visually intuitive way to monitor system performance and manage running processes.

Unlike top, htop allows you to scroll vertically and horizontally to see the complete list of processes and their full command lines. It also supports mouse interactions, so you can select, terminate, or adjust process priorities without manually typing PIDs. Managing multiple processes becomes much simpler with just a few clicks.

Installing htop on Linux

Most Linux distributions do not include htop by default, so you’ll need to install it:

To install on Debian-based distributions (e.g., Ubuntu):

$ sudo apt install htop

To install on RHEL-based distributions (e.g., CentOS, Fedora):

$ sudo dnf install htop

Once installed, run it by typing:

$ htop

You’ll see processes displayed in a cleaner, more organized interface than the top.

Useful htop Shortcuts

The htop command provides several keyboard shortcuts to make process management easier:

  • F1 – open the help menu

  • F2 – open setup options

  • F3 – search for a specific process

  • F4 – filter processes by name

  • F5 – view processes in a tree structure

  • F6 – sort processes by any column

  • F7 – lower the priority of a process

  • F8 – increase the priority of a process

  • F9 – terminate a process

  • F10 – exit htop

With its interactive interface and powerful features, htop is a great tool for efficiently monitoring and managing processes on Linux systems.

Using the pstree Command

The pstree command visualizes processes as a hierarchical tree, showing parent-child relationships. This helps understand process dependencies, such as services that spawn other processes.

To install pstree on Ubuntu/Debian:

$ sudo apt install psmisc

To install it on CentOS/RHEL/Fedora:

$ sudo dnf install psmisc

To view the tree run:

pstree

Options include:

  • -p – show process IDs

  • -u – show process owners

  • -h – highlight currently running processes

  • -a – display full command lines

These commands provide multiple ways to monitor, analyze, and manage Linux processes, from simple snapshots to interactive and historical views, helping you maintain a stable and efficient system.

Using the atop Command (Linux Process List)

In Linux, atop provides real-time monitoring with historical logging, making it suitable for long-term performance analysis. Unlike top or htop, atop can record completed or terminated processes for in-depth review (default logging up to 28 days).

Install atop on Ubuntu/Debian:

$ sudo apt install atop

To install atop on CentOS/RHEL/Fedora, use: 

$ sudo dnf install atop

Launch it with:

$ atop

You can monitor CPU, memory, swap, disk, and network usage at configurable intervals. The most commonly used options and shortcuts include:

  • -i – per-second averages

  • -a – active processes during intervals

  • -c – show command line

  • -m – memory details

  • -d – disk usage

  • -n – network activity

  • -s – scheduling info

  • -v – process metadata

  • -y – thread-level info

Sort processes by: a (activity), c (CPU), d (disk), m (memory), n (network).

Managing Processes in Linux

Once you’ve identified running processes, the next step is to manage them to keep your system running smoothly. This can involve pausing, terminating, or adjusting the priority of processes.

Pausing or Resuming Processes

To view background tasks, use the jobs command. You can bring a background process to the foreground with:

fg <job_number>

In the above command syntax, <job_number> corresponds to the number of the task listed by jobs.

Adjusting Process Priority

To control CPU allocation for processes, you can change their priority with the renice command. A lower priority value gives the process more CPU time, while a higher value reduces its CPU allocation.

renice <priority> <PID>

This allows you to fine-tune system performance by prioritizing important tasks and limiting resource usage for less critical processes.

How to Kill a Process in Linux?

To stop a specific process, use the kill command with its PID (process ID):

kill <PID>

If you need to terminate all processes with the same name, killall is more convenient:

$ killall process_name

Conclusion

Monitoring processes is key to keeping your Linux system healthy and performing well. Tools like ps, top, htop, atop, and pstree enable you to view and track running processes, helping you identify resource-intensive tasks. Regularly checking processes ensures your system stays efficient and responsive.

Experience unmatched VPS performance with BlueVPS.com, offering a reliable and dedicated cloud environment. Enjoy a scalable and customizable solution tailored to your needs, with unlimited traffic to keep your projects running smoothly. Take control of your infrastructure today and unlock the full potential of your VPS.

Blog