How do I install htop inside mac os x?

Here is the laziest way (or homebrew way)

First install Homebrew if you haven't

Second brew install htop

Third, done


I installed htop 0.8 (update: now 2.0.1) from MacPorts with

sudo port install htop

Pre-built binary

Found this tutorial that shows how to do it. The steps are as follows:

$ curl -O http://themainframe.ca/wp-content/uploads/2011/06/htop.zip
$ unzip htop.zip
$ sudo mv htop /bin
$ rm htop.zip

This binary is already pre-built so you should use caution when using executables such as this to make sure that they aren't malicious.

Building it from scratch

You can also follow these directions if you'd like to attempt to build the executable yourself. The tutorial is called: htop for Snow Leopard. A copy of the original reference material is here on Tech Chutney.

General steps

$ git clone git://github.com/AndyA/htop-osx.git

Building this under Snow Leopard requires you to checkout the 'osx' branch:

$ cd htop-osx
$ git checkout -b osx origin/osx

and set your 'CFLAGS' environmental variable to specify a 32-bit build:

$ export CFLAGS="-m32"
before the actual build:

$ ./autogen.sh
$ ./configure
$ make
$ make install