How to Toggle htop Absolute Values and Percentages in Ubuntu
This article explains how to switch between absolute values and percentage views within the htop system monitor on Ubuntu. You will learn the specific keyboard shortcuts required to change memory and CPU meter displays instantly without restarting the application.
Launch htop
Open your terminal on Ubuntu and start the utility by typing the following command and pressing Enter:
htopEnsure you have htop installed. If the command is not found, install
it using sudo apt install htop.
Toggle Memory Display
The most common request is to view memory usage in gigabytes or megabytes rather than a percentage. To toggle the memory meter between percentage and absolute values:
- Look at the memory bar at the top of the htop interface.
- Press the
mkey on your keyboard. - The display will cycle through different modes, including percentage, used/total absolute values, and detailed cache information.
Toggle CPU Display
You can also adjust how CPU usage is represented in the header meters. To change the CPU meter display mode:
- Look at the CPU bars at the top of the htop interface.
- Press the
tkey on your keyboard. - The display will toggle between percentage usage, average load, and total usage views.
Save Your Preferences
Changes made using the m and t keys are
temporary and will reset when you close htop. To make these display
settings permanent:
- Press
F2to open the Setup menu. - Navigate to the Display options section.
- Configure the meters to your preferred default state.
- Press
F10to save and exit.