How to install htop on macOS Unix desktop running on MacBook

I like htop on my Ubuntu server. The man page says it is a free (GPL) ncurses-based process viewer for Linux. Can I install htop on macOS Unix desktop? How do I install htop on macOS sierra based MacBook pro?

Introduction: htop is comparable to the top command, but it has additional options. The htop allows you to scroll vertically and horizontally, so you can see all the processes running on the system. You can get command lines and args. Common tasks related to processes (killing, renicing) done without entering their PIDs. This page explains how to install htop on macOS or mac os x using the CLI.

How to install htop on macOS Unix desktop

You can install htop using the brew command and the procedure is as follows:

  1. Open the Terminal app on mac OS and type the following command
  2. brew install htop
  3. Start htop at the bash shell on the Mac OS or computer.

Let us see how to search and install htop in details on Apple MacBook Pro running macOS. First, install Homebrew on macOS. For instance:
curl -O

Search for htop

The command is as follows:
brew search htop
brew info htop

htop: stable 2.2.0 (bottled), HEAD
Improved top (interactive process viewer)
Not installed
==> Dependencies
Build: pkg-config ?
Optional: ncurses ?
==> Options
	Build using homebrew ncurses (enables mouse scroll)
	Install HEAD version
==> Caveats
htop requires root privileges to correctly display all running processes,
so you will need to run `sudo htop`.
You should be certain that you trust any software you grant root privileges.


Open the Terminal app on your macOS and type the following brew command to install htop:
$ brew install htop
Install htop on macOS Unix desktop running on MacBook Pro
You just installed htop on macOS using Homebrew.

How do I use htop on macOS?

Simply type the htop at your bash prompt:
How to use htop on apple macos x computer

htop interactive commands on macOS

You can use the following keyboard shortcuts:

  1. Up, Down, Left, Right arrow keys – Select and scroll as per given direction
  2. Space – Tag or untag a process. Once tagged you can operate on processes like kill or see tree using function keys. For example, press function (fn) + F9 to kill the process. Press U to untag all processes.
  3. F10 or q – Quit htop
  4. F1, h, ? : Go to the help screen

How to set delay between updates, in tenths of seconds

htop -d 5
htop -d 1

Disable colors output

To start htop in monochrome mode:
htop -C
htop --no-color

Want to get info only for the given PIDs?

htop -p PID
htop --pid=2345,555,667,4242

How to show only the processes of a given user named vivek

htop -u vivek

How to show process in tree view

htop -t
htop --tree


You learned that how to get htop for Mac OS X (macOS) to watch and manage system resources efficiently. It has a colorful display and provides information per core and threads too. For more info see htop project home page here.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • Reshmi Feb 6, 2021 @ 4:12

    Useful to find out what processes are eating ram and why MacBook Pro fan is so loud.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum