Install tmux on Mac OS X
By Ben Couldrey on Nov 26, 2011
This is a short run down on how to get tmux running on your Mac OS X system. The same methodology applies when compiling this on Solaris.
What is tmux?
According to the developer's page, "tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached".
Why not just use screen?
For me, the primary reason I switched to tmux from screen is the much easier configuration syntax that tmux offers. If you've ever struggled with formatting screen's caption or hardstatus line, then you will appreciate the ease with which you can achieve the same results in tmux.
Preparing your environment
You will need a C compiler installed. I believe that OS X ships by default with GNU make, but if not, then you will need to obtain it or use Xcode.
Download the sourcesWhile I'm putting all this together, I like to keep everything neatly tucked away in a build directory.
mkdir ~/build cd ~/build curl -OL http://downloads.sourceforge.net/tmux/tmux-1.5.tar.gz curl -OL http://downloads.sourceforge.net/project/levent/libevent/libevent-2.0/libevent-2.0.16-stable.tar.gz
Unpack the sources
tar xzf tmux-1.5.tar.gz tar xzf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable ./configure --prefix=/opt make sudo make install
cd ../tmux-1.5 LDFLAGS="-L/opt/lib" CPPFLAGS="-I/opt/include" LIBS="-lresolv" ./configure --prefix=/opt make sudo make installThat's all there is to it!