Linux Guide

Install tmux on Ubuntu & Linux

Linux is the native home of tmux. Every major Linux distribution includes tmux in its official package repositories. Choose your package manager below — or build the absolute latest version from source to access every new feature the moment it ships.

Package versions checked against Ubuntu, Debian, Fedora and Arch repositories (October 2026) · source build tested with tmux 3.7c

Install tmux on Ubuntu in one line

sudo apt install tmux on Ubuntu and Debian. Pick your distribution below for the equivalent command on Fedora, Arch, Alpine, or a source build.

Install by Distribution

Select your Linux distribution for the exact package manager command.

Standard

APT Package Manager

The easiest way for Ubuntu/Debian users. Note: The apt version may be one or two releases behind the latest upstream tmux release.

bash

$ sudo apt update && sudo apt install tmux

$ tmux -V

Latest Version

Snap Package

The tmux snap is community-maintained (not published by the tmux project or Canonical) and currently tracks 3.7c. It needs --classic confinement, which gives it the same access as a normal package.

bash

$ sudo snap install tmux --classic

$ tmux -V

DNF / YUM

Fedora / RHEL / Rocky / AlmaLinux

bash

# Fedora

$ sudo dnf install tmux


# RHEL, Rocky, AlmaLinux (tmux is in the base repositories, no EPEL needed)

$ sudo dnf install tmux

$ tmux -V

Pacman

Arch Linux / Manjaro

Arch mirrors typically carry the latest stable tmux release almost immediately after it's published.

bash

$ sudo pacman -S tmux

$ tmux -V

APK

Alpine Linux

Lightweight and fast — common in Docker containers and minimal server environments.

bash

$ apk add tmux

$ tmux -V

1

Install build dependencies

tmux requires libevent, ncurses, bison, and build tools:

bash

$ sudo apt install git build-essential autoconf automake pkg-config bison libevent-dev libncurses-dev

2

Clone, configure, build, and install

build-linux.sh

$ git clone https://github.com/tmux/tmux.git

$ cd tmux

$ sh autogen.sh

$ ./configure && make

$ sudo make install

$ tmux -V

Ubuntu LTS Version Compatibility

Which version of tmux ships by default with each Ubuntu LTS release via apt.

Ubuntu LTS Released tmux via apt Latest tmux Recommendation
Ubuntu 26.04 LTS (Resolute) Apr 2026 3.6a 3.7c apt version is recent enough for most users
Ubuntu 24.04 LTS (Noble) Apr 2024 3.4 3.7c Use snap or build from source for latest
Ubuntu 22.04 LTS (Jammy) Apr 2022 3.2a 3.7c Build from source for latest features
Ubuntu 20.04 LTS (Focal) Apr 2020 3.0a 3.7c Standard support ended — upgrade OS or build from source
Ubuntu 18.04 LTS (Bionic) Apr 2018 2.6 3.7c EOL — upgrade OS or build from source

Other distributions

Versions from each distribution's official package repository, checked October 2026.

Distributiontmux (default repo)Newer option
Debian 13 (Trixie)3.5a3.6b in trixie-backports: sudo apt install -t trixie-backports tmux
Debian 12 (Bookworm)3.3a3.5a in bookworm-backports: sudo apt install -t bookworm-backports tmux
Fedora 43 / 443.7cAlready current
Arch Linux3.7cAlready current

Backports must be enabled first: add a deb http://deb.debian.org/debian trixie-backports main line (or bookworm-backports) to your APT sources and run sudo apt update.

Persistent tmux Daemon via systemd User Service

Ensure your tmux server launches automatically upon system boot and persists across SSH disconnections.

1. Create systemd User Service Unit

Create ~/.config/systemd/user/tmux.service with the following daemon specification:

tmux.service

[Unit]

Description=tmux background daemon


[Service]

Type=forking

ExecStart=/usr/bin/tmux new-session -s default -d

ExecStop=/usr/bin/tmux kill-server

Restart=on-failure


[Install]

WantedBy=default.target

2. Enable Linger & Start Service

Enable user lingering so the daemon runs even when no interactive user sessions are logged in:

bash

$ loginctl enable-linger $USER

$ systemctl --user daemon-reload

$ systemctl --user enable --now tmux

3. Seamless Auto-Attach

Whenever you log in over SSH, simply attach to the running daemon without restarting processes:

tmux attach-session -t default

Linux System Clipboard Integration: Wayland vs. X11

Configure seamless copy-paste between tmux copy mode and your Linux desktop environment.

WAYLAND

Wayland Clipboard (wl-clipboard)

On modern Ubuntu 22.04+ and Fedora (GNOME/KDE Wayland sessions), install wl-clipboard:

sudo apt install wl-clipboard

Add to ~/.tmux.conf:

bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
X11

X11 Clipboard (xclip / xsel)

On traditional X11 desktop sessions, install xclip:

sudo apt install xclip

Add to ~/.tmux.conf:

bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
SSH

Headless SSH (OSC 52)

Over SSH, tmux copies to your local clipboard with OSC 52 escape sequences if your terminal supports them. The default (external) already covers tmux copy mode; set on so programs inside tmux, such as Neovim, can use it too:

set -s set-clipboard on

Troubleshooting on Linux

Resolutions for permissions, locale, and outdated package repositories.

Permission errors during install
Ensure you have sudo privileges. If you're on a shared server without sudo, build tmux from source into a local directory: pass ./configure --prefix=$HOME/.local during the build, then add $HOME/.local/bin to your PATH.
The apt version is too old — how do I get the latest tmux?
The tmux packages in Ubuntu/Debian repositories often lag behind the latest release by 1–3 versions. Your options are: (1) On Debian, install from backports (see the table above), (2) use the community snap (sudo snap install tmux --classic), or (3) build from source using the steps in the "Source" tab above. Building from source is the only guaranteed way to get the absolute latest version.
Locale / UTF-8 display issues
If tmux shows garbled characters or box-drawing symbols aren't rendering, set your locale to UTF-8. Run locale to check your current settings. Configure with sudo locale-gen en_US.UTF-8 and sudo update-locale LANG=en_US.UTF-8. Also add export LANG=en_US.UTF-8 to your ~/.bashrc or ~/.zshrc.
Colors not displaying correctly
Add the following to ~/.tmux.conf: set -g default-terminal "tmux-256color" and set -as terminal-features ",xterm-256color:RGB" (tmux 3.2+), then run tmux kill-server. Also check that echo $TERM outside tmux shows xterm-256color or your terminal's own name, not plain xterm.
How to compile without root (non-sudo unprivileged user)
If you are on an institutional cluster or shared VPS without root access, compile libevent and ncurses locally: ./configure --prefix=$HOME/.local && make && make install, then configure tmux with PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig ./configure --prefix=$HOME/.local.

Other Install Guides

🍎 macOS

Install tmux on macOS via Homebrew, MacPorts, or from source.

macOS Guide →

🪟 Windows

Run tmux on Windows via WSL2, MSYS2, or Cygwin.

Windows Guide →