[tmux.app]
tmux 3.8

Install guide · Linux

Install tmux on Ubuntu & Linux

On Ubuntu and Debian, run sudo apt install tmux. Every major Linux distribution packages tmux, but the version varies a lot: Ubuntu 24.04 gives you 3.4 from February 2024, Arch and Fedora 44 already have 3.8. This page has the command for each distribution, what version you will get, and how to build 3.8 yourself in under a minute.

Updated Tested on tmux 3.88 min read

On this page
  1. Install tmux on Ubuntu in one line
  2. Install tmux on any Linux distribution
  3. Build tmux 3.8 from source on Ubuntu
  4. Which tmux version does each Ubuntu release ship?
  5. Start tmux at boot with a systemd user service
  6. Copy from tmux to the Linux clipboard
  7. Troubleshooting tmux installs on Linux
  8. Next steps

Install tmux on Ubuntu in one line

Quick answer

What is the command to install tmux on Ubuntu?

shell
sudo apt update && sudo apt install tmux
tmux -V
tmux 3.4

That output is from Ubuntu 24.04 LTS. Ubuntu 26.04 LTS installs 3.6a and 22.04 installs 3.2a. Need 3.8? Build it from source or use the static binary.

The same command works on Debian, Linux Mint, Pop!_OS, Raspberry Pi OS, Ubuntu Server and Ubuntu on WSL or an AWS EC2 instance. tmux is in Ubuntu's main repository, so no PPA or extra repository is needed.

Install tmux on any Linux distribution

Pick your distribution. The version column is what the default repository gives you today.

DistributionCommandtmux version
Ubuntu, Debian, Mintsudo apt install tmux3.4 (Ubuntu 24.04), 3.6a (26.04), 3.5a (Debian 13)
Fedorasudo dnf install tmux3.8 (Fedora 44)
RHEL, Rocky, AlmaLinuxsudo dnf install tmux3.3a (10), 3.2a (9), 2.7 (8)
Arch Linux, Manjarosudo pacman -S tmux3.8
Alpineapk add tmux3.7c (v3.24), 3.8 (edge)
openSUSEsudo zypper install tmux3.8 (Tumbleweed), 3.5a (Leap 16.0)
NixOS / Nixnix profile install nixpkgs#tmux3.8 (unstable), 3.7b (26.05)
Gentoosudo emerge app-misc/tmux3.8
Void Linuxsudo xbps-install tmux3.8
FreeBSDsudo pkg install tmux3.8 (ports)
Android (Termux)pkg install tmux3.8

Versions checked 28 October 2026 on Launchpad, packages.debian.org, packages.fedoraproject.org, archlinux.org, pkgs.alpinelinux.org, the Rocky and AlmaLinux mirrors, download.opensuse.org and Repology.

shell
sudo apt update
sudo apt install tmux
tmux -V

apt-get install tmux and apt install tmux do the same thing. On Debian, newer versions are in backports: Debian 13 "trixie" has 3.7c there, Debian 12 "bookworm" has 3.5a. Enable backports once, then install from it:

Debian 13 backports
echo "deb http://deb.debian.org/debian trixie-backports main" | sudo tee /etc/apt/sources.list.d/backports.list
sudo apt update
sudo apt install -t trixie-backports tmux

Use bookworm-backports on Debian 12. Debian testing ("forky") has 3.7c and unstable has 3.8.

shell
sudo snap install tmux --classic
/snap/bin/tmux -V

A tmux snap exists, but it is community-maintained (publisher "Yuzukosho"; the store page says "Use at your own risk"), not published by the tmux project or Canonical. It needs --classic confinement and tracks 3.7c in latest/stable as of 28 October 2026. If the apt package is also installed, /usr/bin comes before /snap/bin in Ubuntu's PATH, so plain tmux still runs the apt version. For most people the official static binary or a source build is the better way to get a newer tmux.

shell
sudo dnf install tmux
tmux -V

Fedora 44 ships 3.8; Fedora 43 has 3.7c, with 3.8 in updates-testing (sudo dnf upgrade --enablerepo=updates-testing tmux). On RHEL, Rocky Linux, AlmaLinux and CentOS Stream, tmux is in the base repository (no EPEL needed), but old: 3.3a on version 10, 3.2a on 9 and 2.7 on 8. Use yum install tmux on RHEL 7 and Amazon Linux 2, whose package is tmux 1.8. On Amazon Linux 2023, use sudo dnf install tmux.

shell
sudo pacman -S tmux
tmux -V
tmux 3.8

Arch's extra repository had 3.8 the day after release. Upgrade with the rest of the system: sudo pacman -Syu, then tmux kill-server.

shell
apk add tmux
tmux -V

Run as root, or prefix doas/sudo. Alpine 3.24 has 3.7c, edge has 3.8. In a Docker image built from alpine, use apk add --no-cache tmux.

shell
sudo zypper install tmux

openSUSE Tumbleweed has 3.8, Leap 16.0 has 3.5a and Leap 15.6 has 3.3a.

/etc/nixos/configuration.nix
programs.tmux.enable = true;

On NixOS, enable the module above (or add pkgs.tmux to environment.systemPackages) and run sudo nixos-rebuild switch. With plain Nix on any distribution, use nix profile install nixpkgs#tmux. nixpkgs unstable has 3.8; the 26.05 channel has 3.7b.

Build tmux 3.8 from source on Ubuntu

A source build is the reliable way to get the newest tmux on an LTS release. It takes about a minute. We ran exactly these commands on Ubuntu 24.04: configure plus make took 26 seconds on a 4-core VM.

  1. Install the build dependencies

    shell
    sudo apt update
    sudo apt install build-essential bison pkg-config libevent-dev libncurses-dev curl

    tmux needs libevent 2.x, ncurses, a C compiler, make, pkg-config and a yacc (bison). On Fedora, RHEL and Rocky the equivalents are sudo dnf install gcc make bison pkgconf-pkg-config libevent-devel ncurses-devel.

  2. Download and unpack the release

    shell
    curl -LO https://github.com/tmux/tmux/releases/download/3.8/tmux-3.8.tar.gz
    tar -xzf tmux-3.8.tar.gz
    cd tmux-3.8

    Release tarballs are on the tmux releases page. The 3.8 tarball's SHA-256 is e79c699c7e949dccd0a4a125e17b8d1261e311b16979dbc8eb34542f3966d82e (check with sha256sum tmux-3.8.tar.gz).

  3. Configure, compile and install

    shell
    ./configure
    make -j"$(nproc)"
    sudo make install

    This installs /usr/local/bin/tmux and its man page. /usr/local/bin comes before /usr/bin in the default PATH, so the new build wins over the apt package; you can keep both or sudo apt remove tmux.

  4. Check the version and restart the server

    shell
    hash -r
    tmux -V
    tmux 3.8
    tmux kill-server

    hash -r makes your current shell forget the old path. If a tmux server from the old version is running, kill-server ends it (and its sessions) so your next tmux starts a 3.8 server. Why this matters →

Install tmux without sudo

On a shared server or HPC cluster, install into your home directory instead. If libevent and ncurses development packages are already installed (they often are), this is all:

shell
./configure --prefix="$HOME/.local"
make -j"$(nproc)" && make install
export PATH="$HOME/.local/bin:$PATH"

Put the export line in ~/.bashrc. If configure stops with "libevent not found" or "curses not found" and you cannot install packages, build those libraries into ~/.local first (each with ./configure --prefix="$HOME/.local" && make && make install), then configure tmux with PKG_CONFIG_PATH="$HOME/.local/lib/pkgconfig" ./configure --prefix="$HOME/.local". The static binary avoids all of this.

Build the development version from Git

shell
sudo apt install git autoconf automake
git clone https://github.com/tmux/tmux.git
cd tmux
sh autogen.sh
./configure && make -j"$(nproc)"
./tmux -V
tmux next-3.9

We built this on 28 October 2026 (commit 565f215). master reports itself as next-3.9; it can change at any time, so use a release for daily work. Useful configure options: --enable-utf8proc (better emoji widths; needs libutf8proc-dev), --enable-sixel (images), --enable-systemd (needs libsystemd-dev) and --enable-static. To remove a source install, run sudo make uninstall in the source folder.

Or download the official static binary

The tmux project publishes prebuilt, statically linked binaries in github.com/tmux/tmux-builds for Linux x86_64 and arm64 (built against musl) and for macOS. Each archive contains one tmux file with no library dependencies, so it works on old distributions and without root. The newest stable build on 28 October 2026 is 3.7c; there is also a "preview" build of master.

x86_64 (use linux-arm64 on ARM servers)
curl -LO https://github.com/tmux/tmux-builds/releases/download/v3.7c/tmux-3.7c-linux-x86_64.tar.gz
tar -xzf tmux-3.7c-linux-x86_64.tar.gz
mkdir -p ~/.local/bin && mv tmux ~/.local/bin/
~/.local/bin/tmux -V

We downloaded the x86_64 and arm64 archives and checked them: each holds a single file, and file reports the x86_64 one as "statically linked".

Which tmux version does each Ubuntu release ship?

Ubuntu does not update tmux to new upstream versions within a release; it only backports security and bug fixes. So the version is fixed by the Ubuntu release you run:

Ubuntu releasetmux via aptReleasedWhat to do for 3.8
26.04 LTS (Resolute Raccoon)3.6aApr 2026apt is fine for most people; build from source for floating panes and themes
24.04 LTS (Noble Numbat)3.4Apr 2024Build from source or use the static binary
22.04 LTS (Jammy Jellyfish)3.2aApr 2022Build from source or use the static binary
20.04 LTS (Focal Fossa)3.0aApr 2020Standard support has ended: upgrade Ubuntu, or use the static binary
18.04 LTS (Bionic Beaver)2.6Apr 2018End of standard support: upgrade Ubuntu

The exact package versions on 28 October 2026 were 3.6a-2ubuntu0.2 (26.04), 3.4-1ubuntu0.2 (24.04) and 3.2a-4ubuntu0.3 (22.04), all updated on 6 October 2026. The version matters for more than features: before 3.5 the default escape-time was 500 ms (a noticeable lag after Esc in Vim), and before 3.8 the mouse was off by default. What changed in each version →

How old is the tmux in each distribution?Years between the version in the default repository and tmux 3.8 (8 Oct 2026). RHEL includes Rocky and AlmaLinux. Hover a bar for the version.

Source: package versions from each distribution, 28 Oct 2026; release dates from git tags in github.com/tmux/tmux

Show the data
DistributionYears older than 3.8
RHEL 88.5 years
Ubuntu 20.046.9 years
Ubuntu 22.045.3 years
RHEL 95.3 years
Debian 124.3 years
RHEL 104.3 years
Ubuntu 24.042.7 years
Debian 132 years
Leap 16.02 years
Ubuntu 26.040.8 years
Alpine 3.240.1 years
Fedora 44, Arch0 years

Rolling and fast-moving distributions (Arch, Fedora, Tumbleweed, Gentoo, Void, Alpine edge, nixpkgs unstable) had 3.8 within days. Long-term-support distributions are years behind by design. On any of them, the source build above works unchanged.

Start tmux at boot with a systemd user service

Optional. A user service starts a detached tmux session when the machine boots, so a session is always waiting when you SSH in. Most people do not need this: tmux sessions already survive SSH disconnects. It is useful on servers that reboot unattended.

~/.config/systemd/user/tmux.service
[Unit]
Description=tmux server with a detached "main" session
Documentation=man:tmux(1)

[Service]
Type=forking
ExecStart=/usr/bin/tmux new-session -d -s main
ExecStop=/usr/bin/tmux kill-server
Restart=on-failure

[Install]
WantedBy=default.target
shell
loginctl enable-linger "$USER"
systemctl --user daemon-reload
systemctl --user enable --now tmux
tmux attach -t main

Type=forking fits because tmux new-session -d starts the server in the background and exits (we checked that on 3.8). enable-linger lets your user services run at boot without a login. Use /usr/local/bin/tmux if you built from source. systemd-analyze verify accepts this unit. Note that panes started this way get systemd's environment, not your SSH login's, so variables such as SSH_AUTH_SOCK are missing until you set them. To bring back windows and layouts after a reboot, use tmux-resurrect and tmux-continuum.

Copy from tmux to the Linux clipboard

tmux's default set-clipboard external already sends copies to your terminal with OSC 52, which works in most modern terminals and even over SSH. When it does not, pipe copies to a clipboard tool with one line:

shell
sudo apt install wl-clipboard
~/.tmux.conf
set -s copy-command 'wl-copy'
shell
sudo apt install xclip
~/.tmux.conf
set -s copy-command 'xclip -selection clipboard'

copy-command is used by every default copy key and by mouse selection. echo $XDG_SESSION_TYPE tells you whether you are on Wayland or X11. Full details, including paste and Neovim, are in the copy mode clipboard guide.

Troubleshooting tmux installs on Linux

What is the command to install tmux on Ubuntu?

sudo apt update && sudo apt install tmux. Check it with tmux -V: Ubuntu 24.04 prints tmux 3.4, 26.04 prints tmux 3.6a.

E: Unable to locate package tmux

Your package lists are empty or stale, which is normal in fresh Docker images and new cloud servers. Run sudo apt update first, then sudo apt install tmux.

configure: error: "libevent not found" (or curses, or yacc)

A build dependency is missing. On Ubuntu and Debian: libevent-dev for libevent, libncurses-dev for curses and bison for yacc. Install all of them with the command above and run ./configure again.

The apt version is too old. How do I get the latest tmux?

Build from source (four commands), download the static binary, or on Debian use backports. Ubuntu itself will not move to a newer tmux within a release.

How do I install tmux without root or sudo?

Download the static binary into ~/.local/bin, or build with ./configure --prefix="$HOME/.local" as shown in Install tmux without sudo.

I installed a new tmux but tmux -V still shows the old version

Your shell remembered the old path (run hash -r or open a new shell), or another copy is earlier in your PATH (type -a tmux lists them all). If tmux -V is right but sessions behave like the old version, the old server is still running: tmux kill-server.

How do I install tmux on an AWS EC2 instance?

Use your AMI's package manager: sudo apt install tmux on Ubuntu and Debian AMIs, sudo dnf install tmux on Amazon Linux 2023 and RHEL. Then start your long job inside tmux new -s work so it keeps running if your SSH connection drops. tmux over SSH →

tmux-yank says its dependencies are not installed

The tmux-yank plugin needs a clipboard program: install wl-clipboard on Wayland or xclip (or xsel) on X11, then reload your config. On a headless server there is no local clipboard; rely on OSC 52 instead.

Box-drawing lines or characters look garbled

tmux needs a UTF-8 locale. Check with locale; if it says POSIX or C, run sudo locale-gen en_US.UTF-8 && sudo update-locale LANG=en_US.UTF-8 and log in again.

Colors look wrong inside tmux

Make sure echo $TERM outside tmux shows xterm-256color or your terminal's own name, then follow true color setup.

Next steps

Keep learning

Something wrong or out of date on this page? Email hello@tmux.app and we will fix it.