How to Install tmux on Ubuntu: Detachable Sessions, Windows and Panes

tmux lets one terminal hold many shells, arranged in windows and panes, and keeps all of them alive when you walk away. The session belongs to a tmux server process rather than to your terminal window, so closing the window or losing an ssh connection only detaches you; attach again later and every program is exactly where you left it. Add keyboard-driven scrollback and copy, and a command language you can bind to keys or call from scripts, and you have the tool that most people who work on remote machines end up living in.

Ubuntu ships tmux, but each release freezes it: Noble stays on 3.4 for the whole life of the LTS. Everything since then, including floating panes (3.7), modal panes, the built-in light and dark themes and the quick window and session switcher (3.8), never reaches a stock system. tmux publishes source code only, so there is no official binary to drop in, and compiling it means pulling in a C toolchain plus the libevent and ncurses headers every time a release comes out.

The unofficial deb.griffo.io repository offers a cleaner path: every tagged tmux release built into an Ubuntu .deb named tmux, exactly like the archive package, so it upgrades the stock tmux in place and stays current through APT.

Install the Latest tmux on Ubuntu: The Short Version

If you only came for the commands, this adds the repository and installs the latest tmux .deb package on Ubuntu:

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt update
sudo apt install tmux

The rest of this guide covers what each command does, what happens to Ubuntu’s tmux, how to get going with sessions, windows and panes, and how to fix the usual problems.

What Makes tmux Special?

  • 🔌 Sessions that survive you - Detach from a running build or server, log out, and pick it up again later from any terminal or ssh login.
  • 🪟 Windows and panes - Tabs called windows, each split into panes, so an editor, a shell and a log tail fit on one screen.
  • 🎈 Floating and modal panes - Panes that float above the layout, and modal ones that hold focus until they exit, for quick commands without disturbing your splits.
  • 📋 Keyboard copy mode - Scroll, search and select through a pane’s history with vi or emacs keys, and send the result to your desktop clipboard over OSC 52, even from a remote host.
  • 🖼️ Sixel images - Sixel support is compiled in, so image-capable programs can draw inside a pane when the outer terminal supports sixel.
  • 🧰 Everything is a command - Bind any action in ~/.tmux.conf, or run it from a shell script to build a full workspace in one go.

Why Use the deb.griffo.io Repository?

  • Same package name as Ubuntu: it is called tmux, so apt upgrade replaces the archive version in place, and byobu, tmuxinator, tpm and python3-libtmux carry on working.
  • One tmux from Jammy to Resolute: the same release on every supported Ubuntu, so a single ~/.tmux.conf behaves the same on all your machines.
  • Configured like the distribution’s build, with systemd, jemalloc and sixel support, compiled from upstream’s release tarball for every tagged release.
  • Terminal features that do not depend on the release: ncurses 6.6 is linked in statically, so the clipboard, cursor colour and style and styled underlines work on Jammy just as on Resolute.
  • Same system integration: /usr/bin/tmux is added to /etc/shells, and a systemd-tmpfiles rule protects the server sockets in /tmp under long-lived sessions.
  • Works across supported Ubuntu releases on amd64 and arm64, with the codename detected for you.

Prerequisites

Before starting, confirm you have:

  • An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, Questing 25.10, or Resolute 26.04 LTS)
  • An amd64 or arm64 machine (a Raspberry Pi 4 or 5 on a 64-bit OS is arm64)
  • sudo privileges
  • curl installed (sudo apt install curl if needed)

No other architectures are built; on an armhf board, keep Ubuntu’s own tmux.

Step 1: Add the deb.griffo.io Repository

Register the key and repository source:

# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings

# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg

# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null

# Update the package list
sudo apt update

Breaking it down:

  1. Create the keyrings directory - makes sure /etc/apt/keyrings exists with the right permissions.
  2. Install the GPG key - downloads and de-armours the repository key into its own keyring so APT can verify signatures.
  3. Add the repository - writes a signed-by source line, letting lsb_release -sc fill in your Ubuntu codename.
  4. Update the package list - refreshes APT’s view of available packages.

Step 2: Update the Package List

If you did not run the final command above, do it now:

sudo apt update

Ubuntu’s own tmux is still visible, so confirm APT prefers the newer build:

apt policy tmux

The candidate should come from https://deb.griffo.io/apt and end in ~griffo, such as 3.8-1~griffo.

Step 3: Install tmux

Install, or upgrade, with APT:

sudo apt install tmux

On a system that already has Ubuntu’s tmux this is a plain in-place upgrade: same package name, nothing removed. The man page, upstream’s example configuration and its CHANGES file come with it.

Step 4: Verify the Installation

Check the version:

tmux -V

You should see something like:

tmux 3.8

That is the version of the client you just ran. If sessions were already open during the upgrade, the server behind them may still be older, as explained next.

Sessions Opened Before the Upgrade

A running tmux server keeps the binary it started with, so existing sessions stay on the old version. The new client attaches to them fine (the client and server protocol has been stable since 3.2a), but anything added since, floating panes for instance, needs a fresh server. Exit the sessions, or stop the server:

tmux kill-server

The next session you open runs the new tmux.

Getting Started with tmux

Working With Sessions

# Start a session named "work"
tmux new -s work

# Detach: press the prefix, Ctrl-b, then d

# See what is running
tmux ls

# Reattach from this terminal or a fresh ssh login
tmux attach -t work

Run tmux on the server rather than on your laptop and a flaky connection stops being a problem. One command reconnects and reattaches:

ssh -t myserver tmux attach -t work

Essential Key Bindings

All bindings start with the prefix, Ctrl-b unless you change it:

KeysAction
Ctrl-b cCreate a window
Ctrl-b n / Ctrl-b pGo to the next / previous window
Ctrl-b %Split side by side
Ctrl-b "Split top and bottom
Ctrl-b + arrowMove to another pane
Ctrl-b zToggle zoom on the current pane
Ctrl-b [Enter copy mode
Ctrl-b dDetach
Ctrl-b ?Show all bindings

Floating and Modal Panes

Floating panes first appeared in tmux 3.7 and grew up in 3.8. They hover over the tiled layout like popups, but behave like ordinary panes: they keep running and can be moved, resized and focused.

# Open a floating pane (Ctrl-b * does the same)
tmux new-pane

# Open a modal pane, which blocks the others until it exits
tmux new-pane -O htop

move-pane and resize-pane handle floating panes, break-pane floats a tiled one and join-pane puts it back. tmux 3.8 also binds Ctrl-b Tab to a fast window switcher and Ctrl-b Shift-Tab to a session switcher.

A Minimal ~/.tmux.conf

tmux reads ~/.tmux.conf, or ~/.config/tmux/tmux.conf. This is a reasonable first version:

# Mouse for selecting panes, resizing and scrolling
set -g mouse on

# Count windows and panes from 1
set -g base-index 1
setw -g pane-base-index 1

# vi-style copy mode and a bigger history
setw -g mode-keys vi
set -g history-limit 50000

# Allow programs inside tmux to set the clipboard via OSC 52
set -s set-clipboard on

# Ctrl-b r reloads this file
bind r source-file ~/.tmux.conf \; display-message "config reloaded"

Reload it in a running server at any time:

tmux source-file ~/.tmux.conf

For more ideas, the package includes upstream’s commented example configuration.

Building a Workspace From a Script

Every binding maps to a tmux command, so a layout is just a few lines of shell:

# Editor on the left, shell on the right, in a detached session
tmux new-session -d -s dev -n code
tmux split-window -h -t dev:code
tmux send-keys -t dev:code.0 'nvim' Enter
tmux attach -t dev

tmuxinator builds sessions like this from YAML, and tpm installs plugins from ~/.tmux.conf. Both call the tmux command, so they move to the new version automatically.

Copying Text

Ctrl-b [ enters copy mode. With mode-keys vi, navigate with vi keys, search with /, press Space to start selecting and Enter to copy, then paste inside tmux with Ctrl-b ].

With set-clipboard on, the copied text is also handed to your local terminal’s clipboard through OSC 52, across ssh as well, provided your terminal emulator permits OSC 52 writes.

Keeping tmux Updated

tmux now updates alongside the rest of Ubuntu:

sudo apt update && sudo apt upgrade

New releases from deb.griffo.io arrive through apt upgrade like any other package. Sessions already running stay on the old server until you exit them or run tmux kill-server.

Other Tools from deb.griffo.io

The repository includes many tools that sit well next to tmux:

  • Zellij - a Rust terminal workspace with layouts and plugins, another take on multiplexing.
  • workmux - pairs git worktrees with tmux windows for isolated per-branch environments.
  • Neovim - the editor you will most often find in a tmux pane.
  • fish - a friendly interactive shell to run in each of them.

Troubleshooting

GPG or Key Errors

If APT flags the repository as unsigned or the key as invalid, re-import it:

curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

APT Still Offers Ubuntu’s tmux

If apt policy tmux shows no deb.griffo.io candidate:

  1. Re-run sudo apt update after adding the repository.
  2. Verify your Ubuntu release is supported (Jammy, Noble, Questing, or Resolute).
  3. Check that dpkg --print-architecture reports amd64 or arm64.
  4. Check the source list: cat /etc/apt/sources.list.d/deb.griffo.io.list.

”unknown command” After Upgrading

If tmux new-pane or a recently added option is rejected, the server is older than the client. Ask the server which version it runs:

tmux display-message -p '#{version}'

If it is behind tmux -V, exit your sessions or run tmux kill-server.

Going Back to Ubuntu’s tmux

To return to the archive build, request it by the version apt policy tmux lists for Ubuntu:

sudo apt install --allow-downgrades tmux=<version>

Uninstalling

Remove tmux with:

sudo apt remove tmux

To also remove the repository and key:

sudo rm /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update

APT leaves ~/.tmux.conf and any plugins under ~/.tmux/ alone; delete them yourself for a clean slate.

Conclusion

Installing tmux from deb.griffo.io puts the same, current tmux on every supported Ubuntu release, from Jammy to Resolute, under the package name Ubuntu already uses. Floating and modal panes, the new switchers and themes, and every fix since your release froze come in with apt upgrade, while the system integration you expect, /etc/shells, the systemd-tmpfiles rule and the man page, stays intact.

Whether you keep long jobs running on remote servers or split your screen between an editor, a shell and logs, the packaged tmux does its job quietly, and APT keeps it current.

Frequently Asked Questions

How do I install the latest tmux on Ubuntu?

Add the deb.griffo.io APT repository and its signing key, then run sudo apt install tmux. Every tagged tmux release is built for you, so there is nothing to compile.

Does it replace Ubuntu’s tmux?

Yes, in place. The package is called tmux, just like the archive’s, and carries a newer version, so APT treats it as an upgrade. byobu, tmuxinator and other packages that depend on tmux are unaffected.

Is there a .deb package for tmux?

Yes. deb.griffo.io publishes tmux as a signed .deb for Ubuntu, and the packaging repository attaches the same files to its GitHub releases. Adding the repository is the better option, since APT then handles every later update.

My sessions do not have the new features. Why?

They are still served by the tmux server that was running before the upgrade. Exit them or run tmux kill-server, and new sessions use the new version.

Which architectures are supported?

amd64 and arm64 on every supported Ubuntu release. armhf and other architectures are not built.

How do I install tmux on Debian?

Exactly the same way; lsb_release -sc simply resolves to a different codename. There is a companion guide with the Debian specifics: How to install tmux on Debian.

Which Ubuntu releases are supported?

Jammy 22.04 LTS, Noble 24.04 LTS, Questing 25.10 and Resolute 26.04 LTS, on amd64 and arm64. Because the repository line is built from lsb_release -sc, the matching suite is selected for you.

Resources


Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream tmux project.