Skip to main content

Dependencies

Before installing tmux, ensure you have the required dependencies:

libevent 2.x

Event notification library required for tmux operation. Available at: https://github.com/libevent/libevent/releases/latest

ncurses

Terminal control library for managing screen output. Available at: https://invisible-mirror.net/archives/ncurses/
To build tmux from source, you’ll also need: a C compiler (gcc or clang), make, pkg-config, and yacc (or bison).

Package Manager Installation

The easiest way to install tmux is through your system’s package manager.
sudo apt update
sudo apt install tmux
After installation, verify tmux is installed correctly by running tmux -V to check the version.

Building from Source (Release)

To build and install tmux from a release tarball:
1

Download the release

Download the latest release tarball from the official repository:
wget https://github.com/tmux/tmux/releases/download/VERSION/tmux-VERSION.tar.gz
tar -xzf tmux-VERSION.tar.gz
cd tmux-VERSION
Replace VERSION with the desired version number.
2

Configure and build

Run the configure script and build tmux:
./configure && make
The configure script will check for required dependencies and configure the build for your system.
3

Install

Install tmux system-wide (requires root privileges):
sudo make install
tmux can use the utempter library to update utmp(5), if it is installed. This allows tmux to properly register terminal sessions.To enable this feature, run configure with the --enable-utempter flag:
./configure --enable-utempter && make
sudo make install

Building from Git (Development)

To get and build the latest development version from version control:
Building from Git requires additional tools: autoconf, automake, and pkg-config. The development version may contain unstable features.
1

Clone the repository

git clone https://github.com/tmux/tmux.git
cd tmux
2

Generate configure script

Run the autogen script to generate the configure script:
sh autogen.sh
3

Configure and build

./configure && make
4

Install

sudo make install

Platform-Specific Notes

On most Linux distributions, both libevent and ncurses are available through the package manager:Ubuntu/Debian:
sudo apt install libevent-dev libncurses-dev
Fedora/RHEL:
sudo dnf install libevent-devel ncurses-devel
On macOS, use Homebrew or MacPorts to install dependencies:Homebrew:
brew install libevent ncurses
MacPorts:
sudo port install libevent ncurses
Xcode Command Line Tools provide the C compiler and other build tools:
xcode-select --install
On FreeBSD, OpenBSD, and NetBSD, tmux is available in the base system or ports:FreeBSD:
# Binary package
pkg install tmux

# Or from ports
cd /usr/ports/sysutils/tmux && make install clean
OpenBSD: tmux is included in the base system on recent OpenBSD versions.
On Solaris 11 and later:
pkg install terminal/tmux
For older versions, you may need to build from source after installing dependencies.

Verify Installation

After installation, verify that tmux is working correctly:
1

Check version

tmux -V
This should display the tmux version number.
2

Start tmux

tmux
This should start a new tmux session with a command prompt and a status bar at the bottom.
3

Exit tmux

Type exit or press Ctrl-d to close the pane and exit tmux.

Troubleshooting

Install libevent development files:Ubuntu/Debian:
sudo apt install libevent-dev
Fedora/RHEL:
sudo dnf install libevent-devel
macOS:
brew install libevent
Install ncurses development files:Ubuntu/Debian:
sudo apt install libncurses-dev
Fedora/RHEL:
sudo dnf install ncurses-devel
macOS:
brew install ncurses
Install bison or yacc:Ubuntu/Debian:
sudo apt install bison
Fedora/RHEL:
sudo dnf install bison
macOS:
brew install bison
Ensure you’re using sudo for the install step:
sudo make install
Or install to a user directory:
./configure --prefix=$HOME/.local
make
make install
Then add $HOME/.local/bin to your PATH.

Next Steps

Quick Start Guide

Now that tmux is installed, learn how to use it with our quick start guide.

Build docs developers (and LLMs) love