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.
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:
Replace VERSION with the desired version number.
2

Configure and build

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

Install

Install tmux system-wide (requires root privileges):
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:

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

2

Generate configure script

Run the autogen script to generate the configure script:
3

Configure and build

4

Install

Platform-Specific Notes

On most Linux distributions, both libevent and ncurses are available through the package manager:Ubuntu/Debian:
Fedora/RHEL:
On macOS, use Homebrew or MacPorts to install dependencies:Homebrew:
MacPorts:
Xcode Command Line Tools provide the C compiler and other build tools:
On FreeBSD, OpenBSD, and NetBSD, tmux is available in the base system or ports:FreeBSD:
OpenBSD: tmux is included in the base system on recent OpenBSD versions.
On Solaris 11 and later:
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

This should display the tmux version number.
2

Start 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:
Fedora/RHEL:
macOS:
Install ncurses development files:Ubuntu/Debian:
Fedora/RHEL:
macOS:
Install bison or yacc:Ubuntu/Debian:
Fedora/RHEL:
macOS:
Ensure you’re using sudo for the install step:
Or install to a user directory:
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.