Dec 11, 2023 2 min read

htop : An interactive command line Linux Task Manager

htop is an interactive process viewer. It is a cross-platform tool used to monitor system processes in real-time. This article will delve into the utility of the htop command in Linux, helping you understand its syntax, options, and practical use-cases.

htop : An interactive command line Linux Task Manager
htop an interactive process viewer

Introduction

htop is an interactive process viewer. It is a cross-platform tool used to monitor system processes in real-time.

Similar to the top command, htop provides an improved user interface with additional features.

It allows users to scroll vertically and horizontally through the list of running processes, providing detailed information such as memory and CPU consumption. Also system wide information, like load average or swap usage, is shown.

This article will delve into the utility of the htop command in Linux, helping you understand its syntax, options, and practical use-cases.

htop: interactive process viewer

Below is upper section explanation which shows overall usage value of CPU, Memory and tasks.

click on image to zoom

Below is lower section explanation which shows process wise usage value of CPU, Memory and tasks.

click on image to zoom

htop Command Options

  • Displays updated process information every second.
htop -d 10
  • htop displays the output without any color.
htop -C
  • Displays only the processes running under the user 'root'.
htop -u root

Advance Usage in htop interface

  • Filter Processes by Name: Press F4 then enter the process name.
  • Tree View : Press F5.
  • To kill a process : Navigate using arrow keys, then press F9 and select a signal to send (use sudo htop if killing root process).
💡
htop supports mouse operation, you can click to interact with the interface.

Binaries

Packages for htop are available in most distros. Try the package manager from your system, chances are htop is available from there.

  • GoboLinux: In GoboLinux you can fetch and compile htop by typing: Compile htop
  • Debian: You can download the binary packages from the Debian webpage. or you can fetch htop by typing: apt install htop
  • Fedora: htop is included in the Fedora repositories; you can fetch it with: dnf install htop
  • RedHat: You can find RPM packages at EPEL.
  • Slackware: htop is part of Slackware. You can find it in the ap/ section.
  • Gentoo: In Gentoo Linux you can emerge the sys-process/htop package by typing: emerge sys-process/htop
  • AltLinux: here are the latest RPMs for AltLinux.
  • OpenSuSE: htop is included in the OpenSuSE build service.
  • Arch Linux: htop is included in Arch Linux official repositories, you can get it with: pacman -S htop
Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to BugFix.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.