How to Clear Filters and Searches in Htop?
The htop interactive process viewer is a powerful tool
for monitoring system resources in Linux, but it’s easy to get stuck in
a filtered or searched view. When you apply a search or a filter,
htop limits the visible process list to only the items
matching your criteria. To clear these active constraints and return to
the full, real-time list of all running processes, you simply need to
press the Esc (Escape) key. This instantly resets your
view without needing to restart the utility.
Understanding Search vs. Filter in Htop
While both functions restrict what you see on the screen,
htop treats searches and filters slightly differently:
- Search (
/): Pressing the forward slash allows you to look for a specific process by name. It highlights the matching process and lets you navigate through matches using F3 (Next) or F4 (Previous). - Filter (
F4): PressingF4allows you to type a keyword that hides all processes except those containing the string. A smallFilter:indicator will appear at the bottom left of the screen while this is active.
The Universal Reset: Using the Escape Key
No matter whether you have an active search highlight or a rigid filter applied, the Esc key acts as the universal clear command.
- Locate the active search or filter at the bottom of your
htopwindow. - Press the Esc key on your keyboard.
- The filter or search text will disappear from the status bar, and your process list will immediately populate with all system processes again.
Alternative Method: Backspacing the Query
If you prefer to transition to a different search or filter rather than clearing it entirely, you can manually modify your query:
- Press F4 to reopen the filter input box (if it isn’t already focused).
- Use the Backspace key to delete your character string.
- Once the input box is completely empty, press Enter.
Using either the Esc key or emptying the text box ensures you can quickly navigate back to a global view of your system’s performance metrics without breaking your workflow.