DropVPS Team
Writer: Cooper Reagan
How to install tmux on Debian 12?

Table of Contents
What you will read?
To get tmux up and running on Debian 12, you can follow a few simple terminal commands. This guide is for users who prefer minimal fluff and want to dive straight into installation and usage.
Step 1: Update Your System
Before installing anything, it’s a good idea to update your package list and existing packages:
sudo apt update && sudo apt upgrade -y
This ensures your system has the latest security patches and package versions.
Step 2: Install tmux via APT
Debian 12 includes tmux in its official repositories, so you can install it directly using:
sudo apt install tmux -y
To verify the installation:
tmux -V
You should see something like:
tmux 3.4
(Version may vary depending on Debian’s repository at the time.)
Step 3: Start Using tmux
To launch a new tmux session, just type:
tmux
Now you’re inside a tmux session. From here, you can start managing multiple terminal windows in one interface.
Step 4: Basic tmux Shortcuts
Here are a few quick commands to help you navigate:
-
Ctrl + b, thenc: Create a new window -
Ctrl + b, thenn: Next window -
Ctrl + b, thend: Detach session -
tmux attach: Reattach to a session
You can list active sessions with:
tmux ls
Step 5: Optional – Configure tmux with .tmux.conf
If you’re planning to use tmux daily, customizing it improves your experience. Create or edit the config file:
nano ~/.tmux.conf
Here’s a basic sample:
set -g mouse on
setw -g mode-keys vi
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
Then reload the config without restarting tmux:
tmux source-file ~/.tmux.conf
Step 6: Installing the Latest Version (Optional)
If you want the latest tmux release (not the one in Debian’s stable repo), you can compile it manually:
Install dependencies first:
sudo apt install -y git automake build-essential pkg-config libevent-dev libncurses-dev
Clone the tmux repo:
git clone https://github.com/tmux/tmux.git
cd tmux
Build and install:
sh autogen.sh
./configure && make
sudo make install
Once done, verify with:
tmux -V
This should now reflect the latest version.