Linux: Monitor Processes, htop

By Xah Lee. Date: . Last updated: .

This page is a tutorial on the Linux process monitoring tool htop. “htop” is a improved tool over the classic top. [see Linux: Monitor Processes: top]

linux htop screenshot 2015-12-26
htop

htop lists ALL threads, not just processs, and provides easier way to let you sort, search, mark, kill, processes.

Install it, by sudo apt-get install htop.

Start it by htop -d 50 for refresh every 5 second. To refresh manually, press Ctrl+l.

Read manual page by man htop or summary by htop --help.

Basic keys:

linux htop help screenshot 2013-02-03
htop help screen. Press h to start help. Press any key to return.

View

Show/Hide

Search Processes

Mark Processes

Actions

Misc

Color Threads, Hide Threads

htop will show all threads, not just process.

Set htop to color threads. Press S to setup. Use arrow keys to navigate.

linux htop screenshot color thread 2015-12-27
htop with colored threads. Note that the video player vlc is playing a video file, and has many threads, in green.

Usually you don't care about thread. So you can just hide them both.

linux htop screenshot color thread 2015-12-27 threads
Thread status.