From source tarball
tmux requires two libraries to be available:
In addition, tmux requires a C compiler, make and pkg-config.
On most platforms, these are available as packages. This table lists the packages needed to run or to buld tmux:
|Platform||Command||Run Packages||Build Packages|
|RHEL or CentOS||
If libevent and ncurses are not available as packages, they can be built from source, see this section.
tmux uses autoconf so it provides a configure script. To build and install
/usr/local using sudo, run:
tar -zxf tmux-*.tar.gz cd tmux-*/ ./configure make && sudo make install
To install elsewhere add
--prefix to configure, for example for
If the dependencies are not available, they can be built from source and installed locally. This is not recommended if the dependencies can be installed from system packages.
Building requires a C compiler, make, automake, autoconf and pkg-config to be installed. It is more common to need to build libevent than ncurses.
Full instructions can be found on the project sites but this is a summary of
how to install libevent and ncurses into
~/local for a single user. To
install system-wide into
/usr/local, substitute for
make install as root (for example with sudo:
make && sudo make install).
tar -zxf libevent-*.tar.gz cd libevent-*/ ./configure --prefix=$HOME/local --enable-shared make && make install
tar -zxf ncurses-*.tar.gz cd ncurses-*/ ./configure --prefix=$HOME/local --with-shared --enable-pc-files --with-pkg-config-libdir=$HOME/local/lib/pkgconfig make && make install
Then the tmux configure script needs to be pointed to the local libraries
tar -zxf tmux-*.tar.gz cd tmux-*/ PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig ./configure --prefix=$HOME/local make && make install
The newly built tmux can be found in
When tmux is installed locally on Linux, the runtime linker may need to be told
where to find the libraries using the
LD_LIBRARY_PATH environment variable,
LD_LIBRARY_PATH=$HOME/local/lib $HOME/local/bin/tmux -V
And to view the manual page,
MANPATH must be set:
MANPATH=$HOME/local/share/man man tmux
Most users will want to configure these in a shell profile, for example in
.profile for ksh or
.bash_profile for bash:
export PATH=$HOME/local/bin:$PATH export LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH export MANPATH=$HOME/local/share/man:$MANPATH
From version control
Building tmux from Git requires a C compiler, autoconf, automake and pkg-config
to be installed. Building is the same as from a tarball except first the
configure script must be generated. To install into
tar -zxf tmux-*.tar.gz cd tmux-*/ sh autogen.sh ./configure make && sudo make install
tmux provides a few configure options:
||Build with debug symbols|
||Create a static build|
||Use the utempter library if it is installed|
||Use the utf8proc library if it is installed|
libevent not found or
ncurses not found
The libevent library or its headers are not installed. Make sure the
appropriate packages are installed (some platforms split libraries from headers
tmux won't run from
On Linux, make sure
LD_LIBRARY_PATH is set, or try a static build instead
--enable-static to configure).
autogen.sh complains about
Make sure pkg-config is installed.
C compiler cannot create executables
Either no C compiler (gcc, clang) is installed, or it doesn't work - check
there is nothing stupid in
Instructions and scripts on building an AppImage package for tmux are available from Nelson Enzo here.