Linux htop Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki

Linux htop Guide

Complete beginner-friendly guide to htop on Linux, covering Arch Linux, CachyOS, and other distributions including installation, process monitoring, and system resource tracking.


Table of Contents

  1. htop Installation
  2. htop Interface
  3. htop Usage
  4. Advanced Features
  5. Troubleshooting

htop Installation

Install htop

Arch/CachyOS:

# Install htop
sudo pacman -S htop

Debian/Ubuntu:

sudo apt install htop

Fedora:

sudo dnf install htop

Launch htop

Start htop:

# Launch htop
htop

# Or with options
htop -d 5  # 5 second delay

htop Interface

Interface Layout

htop display:

  • Top: CPU, memory, swap usage
  • Middle: Process list
  • Bottom: Function keys

Colors

Color coding:

  • Blue: Low priority
  • Green: Normal priority
  • Yellow: High priority
  • Red: Very high priority

htop Usage

Navigation

Keyboard shortcuts:

  • Arrow keys: Navigate
  • F9: Kill process
  • F5: Tree view
  • F6: Sort by
  • Space: Tag process
  • Q: Quit

Process Management

Manage processes:

  1. Select process
  2. F9: Kill menu
  3. Choose signal
  4. Confirm

Advanced Features

Tree View

Process tree:

  1. F5: Toggle tree view
  2. See process hierarchy
  3. Navigate tree

Sorting

Sort processes:

  1. F6: Sort menu
  2. Select sort option
  3. CPU, Memory, Time, etc.

Troubleshooting

htop Not Starting

Check installation:

# Check htop
which htop

# Install if missing
sudo pacman -S htop

Display Issues

Fix display:

# Reset terminal
reset

# Or use different terminal

Summary

This guide covered htop installation, interface, and usage for Arch Linux, CachyOS, and other distributions.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.