What is htop Command Line Tool
This article provides an overview of htop, an
interactive system monitor and process viewer designed for Unix-like
systems. You will learn what htop is, how it improves upon
the traditional top utility, its key features, and how to
navigate its interface to manage system resources effectively.
Understanding htop
htop is a free, open-source, and cross-platform
interactive process viewer. It is a command-line utility that displays a
frequently updated list of the processes running on a computer, normally
ordered by the amount of CPU usage.
Unlike the traditional top command pre-installed on most
Linux systems, htop provides a full, color-coded, and
scrollable list of all running processes. This makes it much easier to
identify which applications are consuming your system’s resources, such
as CPU, Memory (RAM), and Swap space. For a complete guide on usage and
configuration, you can refer to the official htop Command line tool
documentation.
Key Features of htop
- Interactive Interface: You can scroll vertically to view the full process list and horizontally to see complete command lines.
- Mouse Support: It supports mouse clicks, allowing you to select processes, sort columns, and click menu buttons directly in the terminal.
- Easy Process Management: You can kill (stop) or “renice” (change priority of) a process without having to manually type its Process ID (PID).
- Visual Resource Graphs: The top section displays color-coded bars for CPU cores, memory usage, and swap usage, giving an instant visual representation of system health.
- Search and Filter: You can quickly search for specific processes by typing their name or filter the list to show only processes owned by a specific user.
Reading the htop Interface
The htop screen is divided into three main sections:
- The Header: Located at the top, this section shows the resource usage of each CPU core, memory usage, swap usage, tasks statistics, load average, and system uptime.
- The Process List: The main middle section displays
the active processes. Key columns include:
- PID: Process ID.
- USER: The owner of the process.
- PRI & NI: Priority and Nice value (process scheduling priority).
- VIRT/RES/SHR: Virtual, Resident, and Shared memory usage.
- CPU% & MEM%: Percentage of CPU and Memory the process is currently using.
- Command: The actual command that started the process.
- The Footer: The bottom bar displays the function key shortcuts (F1 to F10) for quick actions such as Help, Setup, Search, Filter, Tree view, sorting, killing processes, and quitting the program.