HTop: The Ultimate Tool for Monitoring Your Linux System

Introduction to HTop

HTop is an interactive command-line application that displays real-time CPU, memory, and other system resource usage. Unlike the classic top, HTop offers a colorful and navigable interface with mouse or arrow keys, allowing you to sort processes, search by name, and terminate tasks with a single click.

Quick Installation

In most Linux distributions, HTop is available in the official repositories. On Ubuntu or Debian, simply run:

sudo apt update && sudo apt install htop

On Fedora, use dnf:

sudo dnf install htop

On Arch Linux, the package is in the core repositories:

sudo pacman -S htop

After installation, simply type htop in the terminal and the interface will appear.

Basic Navigation

Once inside HTop, you’ll notice a top bar with CPU, memory, and swap indicators. Below, the process list updates every second. You can move with the up and down arrows, and press F6 to choose the sort criterion (CPU, MEM, TIME, etc.).

  • F1 opens help.
  • F2 opens the configuration, where you can change colors and columns.
  • F3 allows searching for a process by name.
  • F4 filters the list according to what you type.
  • F5 shows the process tree view.
  • F9 sends a signal (default SIGTERM) to the selected process.
  • F10 exits HTop.

Interface Customization

HTop is highly configurable. From the configuration menu (F2) you can:

  • Select which columns to display (PID, USER, PRI, NI, VIRT, RES, SHR, S, CPU%, MEM%, TIME+, Command).
  • Change the color scheme to match your terminal theme.
  • Adjust the screen refresh rate (in milliseconds).
  • Enable or disable kernel thread display.

These settings are saved in the file ~/.config/htop/htoprc, so they persist across sessions.

Advanced Usage: Filters and Searches

The filter (F4) is useful when you want to focus on processes containing a certain string. For example, typing nginx will show only processes related to that service. The incremental search (F3) highlights matches as you type, speeding up the location of a specific process.

Comparison with top and Other Alternatives

Although top remains useful due to its availability on minimal systems, HTop surpasses top in usability:

  • Graphical interface based on ncurses with colors.
  • Mouse support (in terminals that allow it).
  • Multiple sorting and customizable columns.
  • Tree view and real-time filtering.

Other alternatives like glances or gotop offer broader metrics, but HTop remains the most lightweight and process-focused option.

Conclusion

HTop has become an essential tool for system administrators, developers, and any user who wants to monitor Linux performance quickly and intuitively. Its combination of low resource consumption, user-friendly interface, and great customization capability makes it indispensable in the terminal toolbox.