Linux htop Command: Explore Processes Interactively

htop is a tool for exploring CPU and memory usage and the list of processes on an interactive screen. You can easily search, filter, and sort, but depending on the distribution, a separate installation may be required.

What is the htop command?

You can select a process row and examine the target using keyboard functions. Generally, F3 is search, F4 is filter, and F10 is exit. Key mappings may vary depending on the version and terminal settings, so check the on-screen help as well.

Basic syntax

htop [options]

Installed implementations and options may differ depending on the distribution. Use man htop to see the description on the current system.

Examples

Open the interactive screen

Check the top resource usage and the process list below together.

htop

View only specific user tasks

Narrow the scope to the processes of the user being managed.

htop -u alice

Focus on a specific PID

Observe the status of processes that have already been checked.

htop -p 1234

Interactive Screen Reading

htop is an interactive tool that displays CPU usage per core and memory/swap usage at the top, and a list of processes at the bottom. Unlike typical commands that produce a fixed number of lines of output, the screen continuously updates.

htop

Example of display structure (actual numbers and column layout vary depending on settings):

CPU  [####....]  Mem [##......]
PID   USER    CPU%  MEM%  COMMAND
...   ...     ...   ...   ...

You can search by name with F3, change the sorting criteria with F6, and exit with F10 or q. Key bindings may vary depending on the installed version and terminal. When terminating a process, first check the PID and the full command line, and use only the required permissions.

Main Options and Format

Options/Format Description
-u user Limit to the processes of the specified user.
-p PID Start targeting the specified PID.
-d delay Set the refresh delay. The unit can be checked in the implementation's help.
-C Turn off color display in supported versions.

Precautions when using

htop may not be installed by default. Before installing the package, check the repository and package name of your distribution. The feature to send signals from the screen actually affects processes, so double-check the search results and PID, and processes without execution permissions may not be controllable.

Frequently Asked Questions

What should I do if htop is not available?

You can first check with top or ps. If you need htop, verify whether it is provided in the official package repository of your distribution.

Official Documentation

The exact behavior of options and differences by implementation can be checked in the official htop documentation.

More in This Category
Linux dmesg Command: Read Kernel and Boot Messages

Linux dmesg Command: Read Kernel and Boot Messages

Learn how to read Kernel and Boot Messages with the Linux dmesg command, including practical examples, key options, and important precautions.

Linux blkid Command: Find Block-Device UUIDs and Filesystem Types

Linux blkid Command: Find Block-Device UUIDs and Filesystem Types

Learn how to find Block-Device UUIDs and Filesystem Types with the Linux blkid command, including practical examples, key options, and important precautions.

Linux su Command: Switch User Accounts and Login Shells

Linux su Command: Switch User Accounts and Login Shells

Learn how to use the Linux su command to switch user accounts and start login or non-login shells, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux pacman Command: Manage Packages on Arch Linux

Linux pacman Command: Manage Packages on Arch Linux

Learn how to manage Packages on Arch Linux with the Linux pacman command, including practical examples, key options, and important precautions.

Linux nc Command: Test TCP and UDP Connections

Linux nc Command: Test TCP and UDP Connections

Learn how to test TCP and UDP Connections with the Linux nc command, including practical examples, key options, and important precautions.

Bash Command Operators Explained: ;, &&, ||, &, and |

Bash Command Operators Explained: ;, &&, ||, &, and |

Understand how Bash operators run commands sequentially, conditionally, in the background, or through pipelines, with practical examples and precedence guidance.

Linux machine-id: How to Check and Reset It for Cloned Systems

Linux machine-id: How to Check and Reset It for Cloned Systems

Learn what the Linux machine-id identifies, how to check it, and how to prepare cloned system images for unique IDs. Understand the difference between an empty file and first-boot initialization.

Linux info Command: Browse GNU Documentation

Linux info Command: Browse GNU Documentation

Learn how to use the Linux info command to browse hierarchical GNU manuals and navigate Info nodes, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux Tutorial / Manage Files and Directories: Create, Copy, Move, and Delete

Linux Tutorial / Manage Files and Directories: Create, Copy, Move, and Delete

Practice creating, copying, renaming, moving, and deleting files and directories in a dedicated folder while checking each result safely.

Linux who Command: List Logged-In Users

Linux who Command: List Logged-In Users

Learn how to list Logged-In Users with the Linux who command, including practical examples, key options, and important precautions.