Steps to install tmux in Cygwin

  1. Install required Cygwin packages
    1. run Cygwin setup.exe
    2. install these packages that are not installed by default:
      automake, gcc, git and pkg-config
  2. Install libevent
    1. browse http://libevent.org
    2. download libevent-2.0.21-stable.tar.gz
    3. open a cygwin terminal
    4. cd to directory containing downloaded file
    5. tar zxf libevent-2.0.21-stable.tar.gz
    6. cd libevent-2.0.21-stable
    7. ./configure --prefix=/usr
    8. make && make install
  3. Install ncurses
    1. browse http://ftp.gnu.org/gnu/ncurses
    2. download ncurses-5.9.tar.gz
    3. open a cygwin terminal
    4. cd to directory containing downloaded file
    5. tar zxf ncurses-5.9.tar.gz
    6. cd ncurses-5.9
    7. ./configure --prefix=/usr
    8. make && make install
  4. Install tmux
    1. open a cygwin terminal
    2. git clone http://git.code.sf.net/p/tmux/tmux-code tmux-tmux-code
    3. cd tmux-tmux-code
    4. ./autogen.sh (will see many warnings; if it complains about \r not found, convert autogen.sh to use Unix line endings with mv autogen.sh temp.sh; dos2unix -o autogen.sh temp.sh)
    5. CFLAGS="-I/usr/include/ncurses" ./configure --prefix=/usr
    6. make && make install
  5. Configure Cygwin and tmux
    1. to use the Solarized color scheme, see here.
    2. to manually adjust colors, fonts, cursor shape, and more right-click the Cygwin title bar and select "Options...".
    3. create a .tmux.conf file include at least this line so the mouse and arrow keys can be used to switch panes:
      set -sg escape-time 250
    4. for more information about tmux configuration, see here.
  6. run tmux
    1. open a cygwin terminal using mintty (the shortcut that opens the terminal should run C:\cygwin\bin\mintty.exe)
    2. tmux