How to Customize Columns in htop?
The htop command-line tool is a powerful, interactive
process manager for Linux that allows users to monitor system resources
and manage running processes in real time. While its default view
provides a solid overview of system health, you can easily customize the
specific data columns displayed to suit your troubleshooting or
monitoring needs. By accessing the built-in setup menu, you can add,
remove, and reorder columns such as CPU percentage, memory usage,
process owner, and detailed scheduling priorities, tailoring the
interface into a personalized system dashboard.
Accessing the Setup Menu
To begin customizing your display, open htop in your
terminal. Once the interface loads, press the F2 key
(or S on some configurations) to enter the
Setup menu. This action splits your screen into
distinct columns for navigation, pausing the live process updates so you
can safely alter the configuration.
Navigating to Columns Configuration
Inside the Setup menu, use the arrow keys to navigate the setup options:
- Use the Down Arrow to highlight the Columns option in the leftmost “Setup” column.
- Press the Right Arrow to move into the “Available Columns” and “Active Columns” sections.
The screen will now display two main lists: Active Columns on the right (the columns currently visible in your tool) and Available Columns on the left (the metrics you can choose to add).
Adding and Removing Columns
To tailor the data fields to your specific preferences, use the following interactive commands:
- To Add a Column: Scroll through the “Available
Columns” list using the Up and Down arrow keys. Once you highlight a
metric you want to display (such as
PERCENT_MEMorUSER), press F5 or Enter to move it over to the “Active Columns” list. - To Remove a Column: Arrow over to the “Active Columns” list, highlight the piece of data you no longer wish to see, and press F9 (or D). This instantly deletes the column from your active view.
Reordering the Display
The order of the items in the “Active Columns” list from top to bottom corresponds directly to the left-to-right layout on your main screen. To change the position of a column:
- Highlight the column you want to move within the Active Columns list.
- Press F7 (or U) to move the column Up in the list, which shifts it to the Left on the main display.
- Press F8 (or D) to move the column Down in the list, which shifts it to the Right on the main display.
Saving Your Changes
Once you are satisfied with your custom column layout, press
F10 (or Enter on Done) to save your
configuration and exit the setup menu. htop will
immediately refresh, presenting your newly organized process list. These
preferences are automatically saved to your user configuration file
(typically located at ~/.config/htop/htophrc), ensuring
your custom workspace remains intact the next time you launch the
utility.