Skip to content

Instantly share code, notes, and snippets.

@fscm
Created December 19, 2025 12:16
Show Gist options
  • Select an option

  • Save fscm/fee663987a21aabc725a2b01ff15e07a to your computer and use it in GitHub Desktop.

Select an option

Save fscm/fee663987a21aabc725a2b01ff15e07a to your computer and use it in GitHub Desktop.
[macOS] Install 'htop' command from source

[macOS] Install 'htop' command from source

Instructions on how to install the htop command on macOS from source.

Prerequisites

macOS Command Line Tools need to be installed on your local computer.

To install the Command Line Tools run the following command:

xcode-select --install

Get the source

To obtain the htop source code run the following commands:

mkdir -p ~/.src/htop
curl -sL --retry 3 --insecure "https://github.com/htop-dev/htop/releases/download/3.4.1/htop-3.4.1.tar.xz" | tar xz --no-same-owner --strip-components=1 -C ~/.src/htop/
cd ~/.src/htop

Configure

To configure the source to be compiled for macOS run the following commands:

./configure --quiet --prefix=/usr/local

Build

To build the source code run the following command:

make --silent --no-print-directory

Install

To install the tool run the following commands:

sudo make --silent --no-print-directory install-exec install-man

Clean up

After installing the tool you can remove the downloaded source code using the following commands:

cd ~
rm -rf ~/.src
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment