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.
On this page
Install tmux on Ubuntu in one line
Quick answer
What is the command to install tmux on Ubuntu?
sudo apt update && sudo apt install tmux
tmux -V
tmux 3.4That 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.
| Distribution | Command | tmux version |
|---|---|---|
| Ubuntu, Debian, Mint | sudo apt install tmux | 3.4 (Ubuntu 24.04), 3.6a (26.04), 3.5a (Debian 13) |
| Fedora | sudo dnf install tmux | 3.8 (Fedora 44) |
| RHEL, Rocky, AlmaLinux | sudo dnf install tmux | 3.3a (10), 3.2a (9), 2.7 (8) |
| Arch Linux, Manjaro | sudo pacman -S tmux | 3.8 |
| Alpine | apk add tmux | 3.7c (v3.24), 3.8 (edge) |
| openSUSE | sudo zypper install tmux | 3.8 (Tumbleweed), 3.5a (Leap 16.0) |
| NixOS / Nix | nix profile install nixpkgs#tmux | 3.8 (unstable), 3.7b (26.05) |
| Gentoo | sudo emerge app-misc/tmux | 3.8 |
| Void Linux | sudo xbps-install tmux | 3.8 |
| FreeBSD | sudo pkg install tmux | 3.8 (ports) |
| Android (Termux) | pkg install tmux | 3.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.
sudo apt update
sudo apt install tmux
tmux -Vapt-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:
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 tmuxUse bookworm-backports on Debian 12. Debian testing ("forky") has 3.7c and unstable has 3.8.
sudo snap install tmux --classic
/snap/bin/tmux -VA 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.
sudo dnf install tmux
tmux -VFedora 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.
sudo pacman -S tmux
tmux -V
tmux 3.8Arch's extra repository had 3.8 the day after release. Upgrade with the rest of the system: sudo pacman -Syu, then tmux kill-server.
apk add tmux
tmux -VRun 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.
sudo zypper install tmuxopenSUSE Tumbleweed has 3.8, Leap 16.0 has 3.5a and Leap 15.6 has 3.3a.
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.
Install the build dependencies
shellsudo apt update sudo apt install build-essential bison pkg-config libevent-dev libncurses-dev curltmux needs libevent 2.x, ncurses, a C compiler,
make,pkg-configand ayacc(bison). On Fedora, RHEL and Rocky the equivalents aresudo dnf install gcc make bison pkgconf-pkg-config libevent-devel ncurses-devel.Download and unpack the release
shellcurl -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.8Release tarballs are on the tmux releases page. The 3.8 tarball's SHA-256 is
e79c699c7e949dccd0a4a125e17b8d1261e311b16979dbc8eb34542f3966d82e(check withsha256sum tmux-3.8.tar.gz).Configure, compile and install
shell./configure make -j"$(nproc)" sudo make installThis installs
/usr/local/bin/tmuxand its man page./usr/local/bincomes before/usr/binin the default PATH, so the new build wins over the apt package; you can keep both orsudo apt remove tmux.Check the version and restart the server
shellhash -r tmux -V tmux 3.8 tmux kill-serverhash -rmakes your current shell forget the old path. If a tmux server from the old version is running,kill-serverends it (and its sessions) so your nexttmuxstarts 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:
./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
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.9We 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.
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 -VWe 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 release | tmux via apt | Released | What to do for 3.8 |
|---|---|---|---|
| 26.04 LTS (Resolute Raccoon) | 3.6a | Apr 2026 | apt is fine for most people; build from source for floating panes and themes |
| 24.04 LTS (Noble Numbat) | 3.4 | Apr 2024 | Build from source or use the static binary |
| 22.04 LTS (Jammy Jellyfish) | 3.2a | Apr 2022 | Build from source or use the static binary |
| 20.04 LTS (Focal Fossa) | 3.0a | Apr 2020 | Standard support has ended: upgrade Ubuntu, or use the static binary |
| 18.04 LTS (Bionic Beaver) | 2.6 | Apr 2018 | End 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 →
Source: package versions from each distribution, 28 Oct 2026; release dates from git tags in github.com/tmux/tmux
Show the data
| Distribution | Years older than 3.8 |
|---|---|
| RHEL 8 | 8.5 years |
| Ubuntu 20.04 | 6.9 years |
| Ubuntu 22.04 | 5.3 years |
| RHEL 9 | 5.3 years |
| Debian 12 | 4.3 years |
| RHEL 10 | 4.3 years |
| Ubuntu 24.04 | 2.7 years |
| Debian 13 | 2 years |
| Leap 16.0 | 2 years |
| Ubuntu 26.04 | 0.8 years |
| Alpine 3.24 | 0.1 years |
| Fedora 44, Arch | 0 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.
[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.targetloginctl enable-linger "$USER"
systemctl --user daemon-reload
systemctl --user enable --now tmux
tmux attach -t mainType=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:
sudo apt install wl-clipboardset -s copy-command 'wl-copy'sudo apt install xclipset -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.