← Back to tools

htop

An interactive process viewer for Unix

Description

htop is an interactive process viewer for Unix systems. It's a much more feature-rich and user-friendly alternative to top, with mouse support, tree view, filtering, searching, and the ability to send signals to processes.

Install

homebrewbrew install htop
aptsudo apt install htop
pacmansudo pacman -S htop

AI Summary

Interactive process viewer and system monitor. A much better top with mouse support, tree view, filtering, and easy process management.

Capabilities

  • + Interactive process list with sorting and filtering
  • + Tree view showing parent-child process relationships
  • + CPU, memory, and swap usage meters
  • + Search and filter processes
  • + Send signals (kill, terminate) to processes
  • + Mouse support for navigation
  • + Customizable meters and layouts

Use When

  • Monitoring system resource usage
  • Finding and killing resource-hungry processes
  • Investigating system performance issues
  • Need an overview of running processes

Avoid When

  • x Need machine-parseable process data (use ps)
  • x Automated monitoring (use prometheus/grafana)
  • x Need historical performance data

Usage Patterns

Launch interactive viewer

htop

Opens the interactive process viewer

Filter by user

htop -u username

Show only processes owned by a specific user

Sort by memory

htop --sort-key=PERCENT_MEM

Launch sorted by memory usage

Input / Output

stdout: Interactive TUI (no meaningful stdout when piped)
Exit codes:
0 Normal exit

Related Tools

View AGENTS.md for htop