How to Pause screen updates in htop?
The htop utility is a popular interactive process viewer
for Linux that provides real-time updates on system resources like CPU,
memory, and running processes. However, because the screen refreshes
constantly, tracking a rapidly shifting process or reading a specific
line of data can be challenging. This article explains how to
temporarily freeze the screen updates in htop, allowing you
to analyze system metrics at your own pace without the data shifting
beneath your cursor.
Freezing the Display with the Pause Key
The most direct way to halt the real-time updates in
htop is by using the Pause key on your
keyboard.
- To pause updates: Press the
Pausekey (sometimes labeled asBreakon certain keyboards). As soon as you press it,htopstops refreshing the resource bars and process list. - To resume updates: Press the
Pausekey a second time, and the utility will immediately resume its live, real-time monitoring.
Alternative Method: Opening a Menu
If your keyboard lacks a dedicated Pause key—which is
common on modern laptops—you can achieve a temporary freeze by opening
one of htop’s interactive menus.
- Trigger a menu: Press
F2(Setup),F3(Search), orF4(Filter). - Why it works: While these prompt menus or
configuration screens are active,
htopsuspends background process list refreshes. This allows you to safely look at the static data currently visible on your screen. - To resume updates: Press
Escto exit the menu and return to the active, refreshing process view.
Adjusting the Refresh Interval
If you find yourself needing to pause htop frequently
because the data changes too fast, you might prefer to simply slow down
the update frequency permanently.
You can change the delay interval by launching htop from
your terminal with the -d flag followed by a value in
tenths of a second. For example, to set the screen to refresh only once
every 5 seconds, use the following command:
htop -d 50