Frequently Asked Question
What's the difference between top and htop?
top is the classic, distributed with the same procps-ng package as ps and
installed by default almost everywhere. It paints a sortable table of processes that
refreshes every few seconds, plus a header summarising load average, memory use, and
CPU breakdown. Its keystrokes are terse but powerful: M sorts by memory, P by
CPU, k kills a process, r renices one, 1 expands per-CPU stats. It works on
anything, including the smallest BusyBox-based images.
htop is a third-party rewrite from 2004 that adds colour, mouse support, scrolling
both horizontally and vertically, a tree view with one keystroke (F5), and the
ability to send signals or change nice values from a menu rather than by remembering
a number. Its memory and CPU bars at the top are an easier read than top's text
summary. Both read the same /proc data, so neither is "more accurate" than the
other, htop is just friendlier. Many people install it as their first action on a
new server.