How to Search for a Process by Name or PID in htop?

The htop interactive process viewer is a powerful alternative to the traditional top command in Linux, offering a real-time, color-coded overview of system resources. While navigating a massive list of running processes can be overwhelming, htop provides dedicated, efficient built-in shortcuts to instantly filter or locate specific processes by their name or Process ID (PID). This guide will walk you through using the search and filter functions to pinpoint exactly what you are looking for in seconds.

Searching for a Process by Name

If you want to find a process but keep the rest of the process list visible, you can use the native search function. This highlights the matching results as you type.

Filtering the Process List by Name

When dealing with hundreds of active threads, it is often easier to hide everything else and only display the processes you care about. The filtering tool is perfect for this scenario.

Finding a Process by PID

While typing a PID into the search (F3) or filter (F4) menus will successfully locate the numbers, htop also allows you to sort the entire process list by PID for easier navigation.