tmux is a terminal multiplexer — a program that lets you do more than one thing at a time in a terminal window. For example, tmux lets you switch between running an editor to modify a script and running the script itself without exiting the editor. As an added bonus, should you lose your ssh connection, your programs are still running inside tmux and you can bring them up again when you re-connect. If you’ve ever used GNU Screen, it’s the same idea.
Here’s what it looks like in the MinTTY terminal that comes with Cygwin. In this example I’ve split the window across the middle, with an editor open in the bottom and a command prompt at the top. (You can do vertical splits too.)
I recently built tmux again. It’s pretty easy to do, and it takes up less than 7 megabytes of disk space. Here’s how:
Make a directory for your own installs. Mine is called ~/local
You’ll probably have to build libevent 2.0 first if, like me, it’s not already on your system.
Make a directory for building things, if you haven’t already got one.
Download libevent. Be sure to replace 2.0.21 with the latest stable version.
tar xzvf libevent-2.0.21-stable.tar.gz
Build libevent. I used an absolute path with the prefix to be on the safe side.
Download and extract tmux. Get the latest version, which is 1.8 at the time of this writing.
tar xzvf tmux-1.8.tar.gz
If you rolled your own libevent, you’ll need to set appropriate CFLAGS and LDFLAGS when you run configure. Otherwise you can skip export CFLAGS and export LDFLAGS.
export LDFLAGS="-Wl,-rpath=/path/to/my/home/directory/local/lib -L/path/to/my/home/directory/local/lib"
Then add tmux to your path, and you’re done. Do this by putting the following lines in your .bashrc: