The htop system monitor program gives you clear insights into the processes running on your Linux computer, and some functions to manage those processes. Here’s how to use this colorful administrative tool.

Just top With a Facelift?

htop’s mission is to be a bettertop. Like top, htop has a dashboard area above a table of processes. Fans of htop appreciate its use of color, its animated bar graphs, and seeing the complete command line for each process.

You can get a similar effect in top. Press z to go into color mode, press t to graph the CPU load, press 1 to show all CPU cores, and press m to graph RAM usage. Pressing c displays the full command line for each process.

The top program configured with graphs and color.

So does that mean top can do everything htop can? No, not at all. There’s a lot more to htop than pretty colors and graphs.

On Fedora, the command is:

On Manjaro, you’ll use pacman:

Because htop is a terminal application it’s great for monitoring remote servers. You can SSH onto a remote computer, fire up htop, and keep an eye on its performance.

To start htop, type its name and hit Enter.

Installing htop on Ubuntu, in a terminal window.

You’ll see htop’s default display.

The top area is called the Header Area. The lower pane is the Screen Area. htop can display a process screen or an I/O screen. The process screen is the default view.

The Header Area

The Header Area displays information providers called meters. The default meters are a graph for each CPU core, a graph of memory usage, and a graph of swap usage.

There are three numerical meters.

The Process Screen

The Process Screen displays a sorted, dynamic list of system processes. By default, it is sorted by CPU usage, in descending order.

The process state in the S column can be:

Mouse Integration

htop can be controlled by key presses or mouse clicks. Clicking on a column heading sorts the task screen by that column. The title of the selected column has a blue background color, and a triangular indicator appears alongside the column name.

If it points up, it means sort is in ascending order. If it points down, sorting is in descending order. Clicking the same column two or more times toggles the sort direction.

Installing htop on Fedora, in a terminal window.

You can highlight a process by clicking on it, or by using the Home, End, PageUp, PageDown and Arrow keys.

Function Keys

There’s a list of functions keys and their actions at the bottom of the screen. Pressing a function keys or clicking on one of the blue labels performs the action.

These function keys work on the selected process:

The F3 key searches for processes by name. Having found a match, F3 finds the next match and Shift+F3 finds the previous match.

F4 allows you to filter the processes. I pressed F4, and entered “/usr/bin.”

Installing htop on Manjaro, in a terminal window.

F5 toggles a tree displaying the relationship of parent and child processes.

F10 (or q) will quit htop and return you to the command prompt in the terminal window.

htop’s default display after start up.

My terminal window trapped the F10 key for its own use. I had to deselect the Enable the Menu Accelerator Key (F10 by Default) option in my terminal’s preferences before the F10 keystroke was passed to htop.

The F1 key shows a help screen explaining the meter colors, process states, and keyboard shortcuts.

htop’s Header Area.

The I/O Screen

You can move to the I/O screen by pressing Tab, or clicking on the I/O tab located just above the column headers.

The I/O screen columns are:

Configuration

Press F2 to enter Setup. You can configure display options, header layout, meters, screens, and colors. Move the highlight in the Categories column to access the different configuration categories. You can use the Arrow keys, or click one of the categories.

Display Options

The Display Options screen lets you toggle different features on or off by selecting and deselecting check boxes.

Changes to the header area meters take effect immediately.

Header Layout Options

The Header Layout screen lets you set the number of header area columns, and their proportional widths.

The default is two columns, each taking 50% of the screen width.

htop’s process screen.

Meters

The Meters screen lets you choose which meters are displayed in the header area. The display shows as many column as you selected in the Header Layout screen, and a column of Available Meters.

To add a meter to a column, click one of the entries in the Available Meters column, and press Enter. I did this with the System list entry.

A process selected in the htop process screen.

A new entry appears in the Column 2 column, highlighted in brown. The new meter also appears in the Header Area.

You can move the new entry up and down in its column, or to the column left or right, using the Arrow Keys. When you have it in the position you want, press Enter again to lock it in place.

Using the search function in htop.

And finally, in a large LED-style font:

Screens

The Screens setup screen works similarly to the Meters setup screen.

The Screens column lets you select either the main process screen or the I/O screen.

Using the filter function in htop.

Highlighting an entry in the Available Columns column and hitting Enter adds it to the Active Columns column. You can use the Arrow keys to move it, and Enter to lock it in position.

With the highlight in the Screens column, pressing F5 creates a new screen altogether. you may name it and populate it to suit your own needs.

The Colors screen lets you select a color theme.

Clear Updates

The purpose behind the customizations, colors, and graphs is so you may set up htop to clearly display the metrics that matter to you. The easier it is to see them with a quick glance, the easier it is to be aware of the computer’s workload and performance.