Interactive Process Viewer with Htop

LinuxLinuxIntermediate
Practice Now

Introduction

htop is an interactive system-monitor process-viewer and process-manager. It is designed as an alternative to the Unix program top. It shows a frequently updated list of the processes running on a computer, normally ordered by the amount of CPU usage.

htop

Unlike top, htop provides a full list of processes running, instead of the top resource-consuming processes. htop uses color and gives visual information about processor, swap and memory status.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL linux(("`Linux`")) -.-> linux/PackagesandSoftwaresGroup(["`Packages and Softwares`"]) linux/PackagesandSoftwaresGroup -.-> linux/software("`Linux Software`") subgraph Lab Skills linux/software -.-> lab-271667{{"`Interactive Process Viewer with Htop`"}} end

Display Processes

Open the terminal ( ① or ② in the figure ) in the environment and enter the following command:

htop
htop

you'll be greeted with a colorful display showing various system metrics and a list of running processes. Let's break down what you're seeing:

  • Header: At the top, you'll find the system metrics, including CPU, memory, and swap usage. Each CPU core may be represented separately.
  • Body: The list of processes takes up most of the interface. By default, processes are sorted by their CPU usage, but you can change the sorting order.
  • Footer: The bottom of the interface shows the available keyboard shortcuts.

You can use the arrow keys to scroll through the list of processes. Other useful navigation keys include:

  • F1 or ?: Help
  • F2 or S: Setup menu
  • F3 or /: Search for a process
  • F5 or T: Tree view
  • F6 or >: Sort by various criteria
  • F9 or K: Kill a process
  • F10 or Q: Quit htop

Summary

htop is a powerful tool that provides a dynamic and interactive view of your system's processes. By mastering htop, you can efficiently monitor and manage your system's resources. Experiment with different features and customization options to tailor htop to your needs. Happy monitoring!

Other Linux Tutorials you may like