How to Monitor System Resources with Htop on Ubuntu

 If you are using Ubuntu, managing system resources like CPU, RAM, and running processes is a daily task. While the default top command is built-in, it lacks a modern interface and user-friendly controls.

In this guide, you will learn how to install, use, and master htop on Ubuntu to monitor your system performance effectively.

What is Htop?

htop is an interactive and real-time process viewer for Linux systems. Think of it as an advanced, colorful, and user-friendly version of the standard top command. It allows you to scroll vertically and horizontally to see full command lines and process trees, and you can manage processes (like killing or renicing them) using your keyboard or mouse without typing their PID numbers.

Step 1: Update Your Package List

Before installing any new software on Ubuntu, it is best practice to update your local package index. Open your terminal (Ctrl + Alt + T) and run:sudo apt update

Step 2: Install Htop on Ubuntu

Installing htop takes only a single command because it is included in Ubuntu's official repositories. Run the following command in your terminal:sudo apt install htop

Type Y and press Enter if prompted to confirm the installation.

Step 3: Launching Htop

To start the program, simply type its name in the terminal and hit Enter:htop

Once launched, you will see a colorful dashboard divided into three main sections:

Header (Top Section): Displays visual bars for CPU, Memory (RAM), and Swap usage, along with overall tasks, load average, and uptime.

Process List (Middle Section): A real-time table of all running processes sorted by CPU usage by default.

Footer (Bottom Section): A function-key menu (F1 to F10) that lets you perform actions instantly.

Step 4: Essential Keyboard Shortcuts for Htop

Unlike top, htop allows you to use your mouse or simple function keys. Here are the most useful shortcuts to remember:

F1 (Help): Opens the help page explaining all commands.

F2 (Setup): Allows you to customize the layout, color schemes, and display options.

F3 (Search): Type a keyword or process name to search for a specific running application.

F4 (Filter): Filter processes to show only those matching a specific string.

F5 (Tree View): Displays processes in a tree structure, showing parent-child relationships.

F6 (Sort By): Changes the column used to sort processes (e.g., sort by CPU, memory usage, or PID).

F9 (Kill): Sends a signal to kill or terminate a selected process safely.

F10 (Quit): Exit htop and return to the normal terminal prompt.

Conclusion

Monitoring your system performance with htop is quick, efficient, and visually intuitive. Whether you are troubleshooting a frozen application or tracking down high CPU usage on an Ubuntu server, htop is an indispensable tool for every Linux users.

Comments

Popular posts from this blog

Linux Server Hardening Best Practices: Essential Steps to Secure Your Server

Top 10 Essential Linux Commands for DevOps Engineers

Quantum Computing in 2026: Why Traditional Encryption is Facing Its Biggest Threat