How to Filter Processes by Name in htop on Ubuntu
Managing system resources on Ubuntu often requires monitoring specific applications. The htop utility provides an interactive view of running processes, but finding a specific one among hundreds can be difficult. This guide explains how to filter processes by name in htop, allowing you to isolate specific tasks quickly and manage them efficiently without scrolling through the entire list.
Install and Launch htop
If you have not installed htop yet, open your terminal and run the following command:
sudo apt update
sudo apt install htopOnce installed, launch the utility by typing htop and
pressing Enter. You will see a list of all running processes on your
system.
Apply the Process Filter
To filter the list by a specific process name, press the F4 key on your keyboard. This activates the filter bar at the top of the screen.
Type the name of the process you want to find. For example, if you
are looking for Firefox, type firefox. As you type, the
list will immediately update to show only processes matching that
string. Any process that does not match the filter criteria will be
hidden from the view.
Clear the Filter
To return to the full list of running processes, press the F4 key again. This will clear the current filter string and display all processes once more. Alternatively, you can manually delete the text in the filter bar using the backspace key until it is empty.
Understanding Filter vs Search
It is important to distinguish between filtering and searching in htop. Pressing F3 initiates a search, which highlights matching processes but keeps non-matching ones visible. Pressing F4 initiates a filter, which hides non-matching processes entirely. For isolating specific applications, the F4 filter method is the most effective approach.