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 column Command: Format Text as a Table

Linux column Command: Format Text as a Table

Learn how to format Text as a Table with the Linux column command, including practical examples, key options, and important precautions.

Linux date Command: Display and Format the Current Time

Linux date Command: Display and Format the Current Time

Learn how to display and Format the Current Time with the Linux date command, including practical examples, key options, and important precautions.

Linux help Command: Read Help for Bash Built-in Commands

Linux help Command: Read Help for Bash Built-in Commands

Learn how to use the Linux help command to read usage information for Bash built-in commands, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux basename Command: Extract the Final Component of a Path

Linux basename Command: Extract the Final Component of a Path

Learn how to use the Linux basename command to remove directory prefixes and optional suffixes from path strings, 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 clear Command: Clear the Terminal Display

Linux clear Command: Clear the Terminal Display

Learn how to use the Linux clear command to clear the visible terminal screen and understand scrollback behavior, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux Tutorial / Linux Terminal and Shell Basics: Command Syntax and Finding Help

Linux Tutorial / Linux Terminal and Shell Basics: Command Syntax and Finding Help

Learn the difference between a terminal and a shell, read command syntax and output, and use Bash help tools through a short hands-on exercise.

Linux dd Command: Copy and Convert Data by Blocks

Linux dd Command: Copy and Convert Data by Blocks

Learn how to copy and convert files or block devices with Linux dd, choose block sizes and ranges, display progress, verify results, and avoid overwriting the wrong device.

Linux sudo Command: Run Commands with Elevated or Another User's Privileges

Linux sudo Command: Run Commands with Elevated or Another User's Privileges

Learn how to use the Linux sudo command to run approved commands with elevated privileges or as another user, with essential options, practical examples, output interpretation, and common troubleshooting tips.

Linux lsblk Command: Inspect Disks, Partitions, and Mounts

Linux lsblk Command: Inspect Disks, Partitions, and Mounts

Learn how to inspect Disks, Partitions, and Mounts with the Linux lsblk command, including practical examples, key options, and important precautions.