Instructions on how to install the htop command on macOS from source.
macOS Command Line Tools need to be installed on your local computer.
To install the Command Line Tools run the following command:
xcode-select --installTo 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/htopTo configure the source to be compiled for macOS run the following commands:
./configure --quiet --prefix=/usr/localTo build the source code run the following command:
make --silent --no-print-directoryTo install the tool run the following commands:
sudo make --silent --no-print-directory install-exec install-manAfter installing the tool you can remove the downloaded source code using the following commands:
cd ~
rm -rf ~/.src