How to Change htop Update Interval on Ubuntu
This article provides a quick guide on modifying the refresh rate of the htop process viewer in Ubuntu. You will learn how to temporarily adjust the update speed during a session and how to make the change permanent by editing the configuration file. These steps ensure you can monitor system resources at a pace that matches your specific debugging or observation requirements.
Adjusting the Interval Temporarily
The fastest way to change the update interval is directly within the htop interface. This method applies only to the current session and resets when you close the application.
- Launch htop by typing
htopin your terminal. - Press the s key on your keyboard.
- Enter the desired delay in seconds (e.g.,
0.5for half a second or5for five seconds). - Press Enter to confirm.
Alternatively, you can press F2 to open the Setup menu, navigate to the Delay field, and modify the value there.
Setting a Permanent Update Interval
To save your preferred update interval across all future sessions, you must edit the htop configuration file.
- Close htop if it is currently running.
- Open the configuration file in a text editor using the following
command:
bash nano ~/.config/htop/htoprc - Locate the line starting with
delay=. - Change the value to your desired interval in tenths of a second. For
example, set
delay=10for a 1-second update ordelay=5for half a second. - Save the file by pressing Ctrl+O, then Enter, and exit with Ctrl+X.
The next time you launch htop, it will use the new default update interval.