Vivian Voss

htop: 20 Years of Treating the Terminal as a Canvas

unix tooling freebsd

Technical Beauty ■ Episode 14

In 2004, Hisham Muhammad looked at top and saw a tool from 1984 pretending the terminal was still a teletype. No colours. No scrolling. No mouse. Process IDs memorised and typed by hand.

His solution was straightforward: treat the terminal as what it had become. An interactive canvas.

One Tool, Five Workflows

htop did not invent process monitoring. It consolidated an entire workflow into a single binary:

  • top, but scrollable, coloured, and interactive
  • ps aux | grep, but with live filtering
  • kill -9 PID, but with F9 and a menu
  • renice, but with a single keypress
  • lsof, but integrated into the tree view

You no longer memorised PIDs. You pointed at them. In a terminal. In 2004. Rather ahead of the curve, that.

top (1984) vs htop (2004) top Static output No scrolling No colour No mouse Type PIDs manually ~4,900 LOC 1984 htop Interactive canvas Scroll + tree view Per-core CPU bars Mouse support Point, click, kill ~12,000 LOC 2004

The Numbers

12,000 lines of C. Open source. Runs on FreeBSD, Linux, macOS, OpenBSD, Solaris. Ships in every major distribution. Zero configuration required. Zero dependencies beyond ncurses.

top still ships by default. htop still gets installed first. Some tools earn their place not by being mandatory, but by being indispensable.

The Handover

In 2020, after sixteen years of solo maintenance, Hisham stepped back. The community forked amicably. The htop-dev team continues the legacy.

This is a rare thing in open source: a healthy transition. The maintainer was not abandoned, not burned out and left behind. He handed over, and the project continued. One might call that a design endorsement for the codebase itself. Sixteen years of solo maintenance, and the code was clean enough for strangers to pick up.