Commands.page Logo

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:

htop

Ensure 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:

  1. Look at the memory bar at the top of the htop interface.
  2. Press the m key on your keyboard.
  3. 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:

  1. Look at the CPU bars at the top of the htop interface.
  2. Press the t key on your keyboard.
  3. 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:

  1. Press F2 to open the Setup menu.
  2. Navigate to the Display options section.
  3. Configure the meters to your preferred default state.
  4. Press F10 to save and exit.