Tmux In-Depth Guide v2

Source: infotinks.com — screen, dtach, byobu, tmux — tmux wins

v1 Guide: http://www.infotinks.com/tmux-look-screen-dtach-byobu-tmux-wins-indepth-tmux/


Table of Contents

  1. Configuration Files
  2. Quick Download Cheatsheet
  3. Article Update History
  4. What Is Tmux? (History & Comparison)
  5. Core Concepts: Sessions, Windows, and Panes
  6. Getting Started
  7. Default Key Bindings (Prefix Ctrl-b)
  8. Session Management
  9. All Tmux Command-Line Options
  10. Process Tree of Tmux
  11. Changing Key Bindings
  12. Key Bindings Reference — Prefix Ctrl-a (Default Keys)
  13. Key Bindings Reference — Screen-Like (Favorites)
  14. Byobu with Tmux
  15. Starting Tmux on Login

Configuration Files

Three pre-built .tmux.conf configurations are available:

# Description Prefix Download Link Key Map Reference
1 Default key bindings Ctrl-b home-dot-tmux-b-def-20220927.conf Default tmux keys
1a Same as above, for older tmux 1.8 Ctrl-b home-dot-tmux-b-def-20230122-tmux18.conf Default tmux keys
2 Screen-like keys (favorite) Ctrl-a home-dot-tmux-a-fav-20220927.conf Screen-like keys
3 Screen-like keys (favorite) Ctrl-q home-dot-tmux-q-fav-20220927.conf Screen-like keys (substitute Ctrl-q for Ctrl-a)

Quick Download Cheatsheet

Newer Tmux — Ctrl-b Prefix

wget http://www.infotinks.com/tmux/home-dot-tmux-b-def-20220927.conf -O ~/.tmux.conf
curl http://www.infotinks.com/tmux/home-dot-tmux-b-def-20220927.conf -o ~/.tmux.conf

Older Tmux (1.8) — Ctrl-b Prefix

wget http://www.infotinks.com/tmux/home-dot-tmux-b-def-20230122-tmux18.conf -O ~/.tmux.conf
curl http://www.infotinks.com/tmux/home-dot-tmux-b-def-20230122-tmux18.conf -o ~/.tmux.conf

Ctrl-a Prefix (Screen-Like)

wget http://www.infotinks.com/tmux/home-dot-tmux-a-fav-20220927.conf -O ~/.tmux.conf
curl http://www.infotinks.com/tmux/home-dot-tmux-a-fav-20220927.conf -o ~/.tmux.conf

Ctrl-q Prefix (Screen-Like)

wget http://www.infotinks.com/tmux/home-dot-tmux-q-fav-20220927.conf -O ~/.tmux.conf
curl http://www.infotinks.com/tmux/home-dot-tmux-q-fav-20220927.conf -o ~/.tmux.conf

For Ubuntu

Use the kitty terminal as it supports tmux copy mode. Per reports, WezTerm should work as well, but kitty has been tested and works reliably.


Article Update History

2025-05-10 — Added “For Ubuntu” configuration note (use kitty terminal).

2025-01-06 — Updated all default configurations to enable scrollback with Vim mode instead of the default Emacs mode. All main configs now include setw -g mode-keys vi (commented out in the older tmux config in case it’s unsupported).

Vim scrollback navigation (enter with <prefix> [):

Key Action
h j k l Move left, down, up, right
G Jump to bottom
gg Jump to top
Ctrl-d Half-screen down
Ctrl-u Half-screen up
/ Forward search
? Backward search
Space Begin selection
Enter Copy selection
<prefix> ] Paste copied text

2024-11-08 — Updated default configs with new useful tools. Synced cheatsheets with all changes. Reformatted the article.

2023-08-28 — Added Prefix+R to respawn current pane via :respawn-pane -k. This is useful for stuck/frozen SSH sessions in a pane. Using the SSH escape key is risky because it can quit your parent SSH session (the one tmux is using). While reconnecting and reattaching works, respawn-pane -k is the safer approach. Note: Config filenames were not updated to avoid relinking all download URLs. Going forward, filenames follow the pattern home-dot-tmux-<PREFIX>-<fav|def>-20220927.conf.

2023-01-22 — Added default key bindings config for older tmux 1.8 (prefix b, with some lines adjusted for compatibility).

2022-10-21 — Read about gripes with shells not fully supporting tmux mouse mode.

2022-09-29 — Added pane disable/enable feature for sync-panes mode:

  • Select a pane, then press Prefix+Ctrl-d to disable it (no keyboard input accepted).
  • Press Prefix+Ctrl-e to re-enable it.
  • Useful when you have multiple panes in sync mode but only want to type into a subset.
  • Updated configs: Default (b) | Fav (a) | Fav (q)

2022-09-09 — Created new key mappings with Ctrl-q prefix. Ctrl-q is rarely used in bash, so this frees up Ctrl-a (which jumps to the beginning of a command line).

2022-05-26 — New configs:

2020-11-10 — New prefix a config: Scrolling is more precise (1 line per scroll action). Preserves current path when creating new pane or window. Note (2022-02-28): This config had errors with tmux 1.8 but works with tmux 2.8+.

2019-07-31 — Clipboard integration notes:

Platform How to Copy
Windows (Cygwin) Zoom pane (prefix+z), then Shift+Mouse Drag to select (auto-copies to clipboard). Zoom out with same key combo.
Mac (Terminal.app) Zoom pane (prefix+z), then Fn+Mouse Drag to select, Cmd+c to copy, Cmd+v to paste. Zoom out with same key combo.
Mac (iTerm2)best Zoom pane (prefix+z), then Opt+Mouse Drag to select (auto-copies to clipboard). Zoom out with same key combo. Additionally, enable iTerm2 → Preferences → General → "Applications in terminal may access clipboard" — then you don’t need to zoom; a simple mouse drag selects text and copies it, respecting pane/window dimensions.

2019-07-26 — On Mac (and probably Linux), use config from 2016-10-27 or 2019-02-26. Instead of Shift, use Fn on Terminal.app or Option on iTerm2. References: Keys on Mac, Copy + Paste.

2019-02-26 — Config used on a work Linux server (CentOS 6.2, kernel 2.6.32-220) with tmux plugins (Google “tmux plugin manager / tpm”): home-dot-tmux-1.conf. Uses screen-like key bindings — see screen tmux bindings.

2016-10-27 — Installed the tmux plugin manager, which enabled mouse support in windows and panes. Config: http://www.infotinks.com/tmux/home-dot-tmux.conf. Uses screen-like key bindings — see screen tmux bindings.


What Is Tmux?

Tmux is a terminal multiplexer — a separate program from screen. Some people compare byobu to tmux, but that’s not quite accurate (though functionally they appear similar; tmux does it better).

The Evolution of Terminal Multiplexers

  1. dtach — Allows running a session under the init process. If you close your terminal or detach (Ctrl-), your programs keep running.
  2. screen — Built on the dtach concept, adding split screens, configuration files, and more.
  3. byobu — A wrapper around screen: it’s just screen + a config modifier (plus some helper programs). Can be set to launch on boot (as can dtach, tmux, and screen).
  4. tmux — Took lessons from screen’s 25+ years of code and corrected its mistakes (screen’s codebase is too slow to update meaningfully).

The Key Difference: Screen vs. Tmux

From superuser.com:

“A window in screen is a single pseudo-terminal. When attached to a screen session, you can split your terminal into multiple regions, each of which can display a screen window. Multiple regions can display the same window. The splits are not part of the session; if you detach, your splits are gone.

A window in tmux consists of one or more pseudo-terminals, one per pane. This means that panes persist if you detach and reattach later. It also means that you can display only one window at a time in tmux, and that panes cannot be shared among multiple windows. tmux does allow a window to be shared among multiple sessions, however.

I prefer the model used by tmux, but I couldn’t argue that it is better than the model used by screen.”

The biggest problem with screen (and dtach): when you reattach to a session, all your regions (panes in tmux terms) are lost. Tmux preserves them.

The same author noted that a future version of byobu would use tmux as its backend.


Core Concepts

Concept Description
Session The top-level container. You attach/detach to sessions. Each session can contain multiple windows.
Window A tab within a session. Each window contains one or more panes.
Pane A rectangular region within a window. Each pane runs its own pseudo-terminal (ptty/bash session). This is the smallest unit.

Key relationships:

  • A session can have many windows (tabs), each with many panes.
  • One window can have one or many panes.
  • Tmux remains running on the system until the last session is exited.
  • You can only attach/detach at the session level (not individual windows or panes).

A great visual reference: Daniel Miessler’s tmux primer.


Getting Started

Installation

apt-get update
apt-get install tmux

Starting Tmux

tmux

This starts 1 session with 1 window and 1 pane (as big as your terminal, minus the green status bar).

Optional: Install Screen-Like Key Bindings

cp /usr/share/doc/tmux/examples/screen-keys.conf ~/.tmux.conf

Command Shortcuts

Short Form Long Form Description
tmux ls tmux list-sessions List all sessions (IDs are the first number on each line)
tmux a -t0 tmux attach-session -t0 Attach to session with ID 0
tmux a tmux attach Attach to the most recent session

Quick Tip

Check all available commands with man tmux or tmux list-commands. Inside tmux, view current key bindings with <prefix> ? (i.e., Ctrl-b ? by default).


Default Key Bindings (Prefix Ctrl-b)

These apply to the config file with “tmux-b-def” in its name.

The prefix key is Ctrl-b. Press it first, release, then press the action key.

Meta is Esc. When a binding calls for META-UP, press Ctrl-b, then Esc, then Up.

Help & Info

Key Binding Action
Ctrl-b ? Show help (scroll with arrows, quit with q)
Ctrl-b t Show clock in current pane (dismiss with Enter or q)
Ctrl-b q Flash pane numbers on screen

Pane Management

Key Binding Action
Ctrl-b " Horizontal split (creates new pane below)
Ctrl-b % Vertical split (creates new pane to the right)
Ctrl-b o Cycle to next pane
Ctrl-b Arrow Keys Move to adjacent pane
Ctrl-b Esc+Arrow Keys Resize current pane in the arrow direction
Ctrl-b { Swap pane position up (other panes shift)
Ctrl-b } Swap pane position down (other panes shift)
Ctrl-b z Zoom in/out of current pane (toggle fullscreen)
Ctrl-b x Kill current pane (confirms with y)

Window/Tab Management

Key Binding Action
Ctrl-b c Create new window/tab
Ctrl-b n Next window/tab
Ctrl-b p Previous window/tab
Ctrl-b <number> Switch to window by number (number row, not numpad)
Ctrl-b Space Cycle through layouts
Ctrl-b k Kill current window and all its panes (confirms with y)
Ctrl-b , Rename current window/tab (backspace to clear, type new name, Enter)

Session Management

Key Binding Action
Ctrl-b d Detach from session (session keeps running)
Ctrl-b $ Rename current session (used for reattaching later)

Scrollback & Copy Mode

Key Binding Action
Ctrl-b PageUp/PageDown Scroll through pane history (press once, then use PageUp/PageDown; q to exit)
Ctrl-b [ Enter copy mode (scroll line-by-line with arrow keys; see Vim scrollback keys above)

Custom Extras (From Provided Config)

Key Binding Action
Ctrl-b Ctrl-s Toggle sync-panes (type in all panes simultaneously)
Ctrl-Shift Left/Right Move window/tab position left/right (no prefix needed)
Ctrl-b O Disable pane input (useful in sync mode; think “O” = “0” = off)
Ctrl-b I Enable pane input (think “I” = “1” = on)
Ctrl-b R Respawn current pane (respawn-pane -k; useful for stuck SSH sessions)

Session Management

Listing Sessions

tmux list-sessions
# or
tmux ls

Attaching to a Session

tmux attach          # attach to the most recent session
tmux attach -t 3     # attach to session named/numbered 3

Killing a Session

tmux kill-session -t 3

Example Workflow

$ tmux list-sessions
0: 2 windows (created Sun Jan 26 08:38:45 2014) [115x60]
3: 2 windows (created Sun Jan 26 08:45:38 2014) [115x56]

The -t value is the session name (the first number, e.g., 0 or 3).

You can only attach/detach at the session level — each session comes with all its windows and panes.

To close session 3, either:

  1. Attach to it (tmux attach -t 3), then type exit in every pane until the session closes.
  2. Or simply run tmux kill-session -t 3.

After killing session 3:

$ tmux list-sessions
0: 2 windows (created Sun Jan 26 08:38:45 2014) [115x60]

Important notes:

  • You cannot launch tmux from inside tmux (unless you do “magic” — don’t do it).
  • You cannot move panes between sessions or windows.

Auto-Completion

Tmux supports auto-completion and argument detection at the command line (similar to Cisco IOS). For example:

$ tmux ?
ambiguous command: c, could be: capture-pane, choose-buffer, choose-client, choose-session, choose-window, clear-history, clock-mode, command-prompt, confirm-before, copy-mode

$ tmux l
ambiguous command: l, could be: last-pane, last-window, link-window, list-buffers, list-clients, list-commands, list-keys, list-panes, list-sessions, list-windows, load-buffer, lock-client, lock-server, lock-session

All Tmux Command-Line Options

tmux list-commands
attach-session [-dr] [-t target-session]
bind-key [-cnr] [-t key-table] key command [arguments]
break-pane [-d] [-t target-pane]
capture-pane [-b buffer-index] [-E end-line] [-S start-line] [-t target-pane]
choose-buffer [-t target-window] [template]
choose-client [-t target-window] [template]
choose-session [-t target-window] [template]
choose-window [-t target-window] [template]
clear-history [-t target-pane]
clock-mode [-t target-pane]
command-prompt [-I inputs] [-p prompts] [-t target-client] [template]
confirm-before [-p prompt] [-t target-client] command
copy-mode [-u] [-t target-pane]
delete-buffer [-b buffer-index]
detach-client [-P] [-s target-session] [-t target-client]
display-message [-p] [-c target-client] [-t target-pane] [message]
display-panes [-t target-client]
find-window [-t target-window] match-string
has-session [-t target-session]
if-shell shell-command command [command]
join-pane [-dhv] [-p percentage|-l size] [-s src-pane] [-t dst-pane]
kill-pane [-a] [-t target-pane]
kill-server
kill-session [-t target-session]
kill-window [-t target-window]
last-pane [-t target-window]
last-window [-t target-session]
link-window [-dk] [-s src-window] [-t dst-window]
list-buffers
list-clients [-F format] [-t target-session]
list-commands
list-keys [-t key-table]
list-panes [-as] [-F format] [-t target]
list-sessions [-F format]
list-windows [-a] [-F format] [-t target-session]
load-buffer [-b buffer-index] path
lock-client [-t target-client]
lock-server
lock-session [-t target-session]
move-window [-dk] [-s src-window] [-t dst-window]
new-session [-d] [-n window-name] [-s session-name] [-t target-session] [-x width] [-y height] [command]
new-window [-adk] [-n window-name] [-t target-window] [command]
next-layout [-t target-window]
next-window [-a] [-t target-session]
paste-buffer [-dr] [-s separator] [-b buffer-index] [-t target-pane]
pipe-pane [-o] [-t target-pane] [command]
previous-layout [-t target-window]
previous-window [-a] [-t target-session]
refresh-client [-S] [-t target-client]
rename-session [-t target-session] new-name
rename-window [-t target-window] new-name
resize-pane [-DLRU] [-t target-pane] [adjustment]
respawn-pane [-k] [-t target-pane] [command]
respawn-window [-k] [-t target-window] [command]
rotate-window [-DU] [-t target-window]
run-shell command
save-buffer [-a] [-b buffer-index]
select-layout [-np] [-t target-window] [layout-name]
select-pane [-lDLRU] [-t target-pane]
select-window [-lnp] [-t target-window]
send-keys [-R] [-t target-pane] key ...
send-prefix [-2] [-t target-pane]
server-info
set-buffer [-b buffer-index] data
set-environment [-gru] [-t target-session] name [value]
set-option [-agsuw] [-t target-session|target-window] option [value]
set-window-option [-agu] [-t target-window] option [value]
show-buffer [-b buffer-index]
show-environment [-g] [-t target-session]
show-messages [-t target-client]
show-options [-gsw] [-t target-session|target-window]
show-window-options [-g] [-t target-window]
source-file path
split-window [-dhvP] [-p percentage|-l size] [-t target-pane] [command]
start-server
suspend-client [-t target-client]
swap-pane [-dDU] [-s src-pane] [-t dst-pane]
swap-window [-d] [-s src-window] [-t dst-window]
switch-client [-lnpr] [-c target-client] [-t target-session]
unbind-key [-acn] [-t key-table] key
unlink-window [-k] [-t target-window]

Process Tree of Tmux

Tmux Server vs. Tmux Client

  • Tmux server: The process closest to init/systemd. It holds all sessions, windows, and panes as child processes. It survives SSH disconnects. To shut it down, you must exit all panes/windows/sessions.
  • Tmux client: Created when a user attaches to a session. It mirrors user input to the session’s pseudo-terminal and displays the output. If the SSH connection drops, the client dies but the server (and its sessions) persist.

Even with millions of panes and sessions, there is only one tmux server process. The panes (pseudo-terminals) are its child processes.

When Detached (Server Only)

$ ps aux | egrep tmux | grep -v grep
root  18740  0.1  0.3  27460  3112  ?  Ss  08:38  0:05  tmux

After Attaching (Server + Client)

$ tmux attach

$ ps aux | egrep tmux | egrep -v grep
root   3128  0.0  0.1  17544  1172  pts/3  S+  09:40  0:00  tmux   # <- client
root  18740  0.1  0.3  27460  3112  ?      Ss  08:38  0:06  tmux   # <- server

Lifecycle

  • No tmux running → Run tmux → Creates server + client.
  • Detach → Client dies, server remains.
  • New terminaltmux attach → Creates new client connecting to existing server.

Example Process Tree

Five sessions, multiple windows each, 19 total panes:

systemd,1                              # PID 1 (init/systemd)
├─sshd,1445
│ ├─sshd,2718
│ │ └─bash,2833
│ │   └─pstree,6006 -ap
│ └─sshd,17300
│   └─bash,17305
│     └─tmux,3128                      # <- tmux CLIENT (under sshd; dies if SSH closes)
│
├─tmux,18740                           # <- tmux SERVER (under systemd; survives SSH close)
│ ├─bash,778
│ │ └─tail,895 -f /var/log/syslog
│ ├─bash,961
│ │ └─lsof,1432 -c tmux -r m===========%D-%T============
│ ├─bash,1536
│ │ └─watch,1831 free
│ ├─bash,1600
│ │ └─top,1868
│ ├─bash,1658
│ │ └─watch,1770 ls -lisah /var/log
│ ├─bash,3129
│ ├─bash,18741
│ │ └─watch,18880 df
│ ├─bash,18787
│ │ └─watch,18891 netstat -ntlp
│ ├─bash,18833
│ │ └─top,18879
│ ├─bash,18912
│ │ └─watch,19330 ls -lisah /var/log
│ ├─bash,18966
│ ├─bash,19044
│ ├─bash,19110
│ ├─bash,19162
│ ├─bash,19212
│ │ └─watch,19297 df -h
│ ├─bash,24812
│ ├─bash,25565
│ │ └─man,26253 tmux
│ │   └─pager,26264 -s
│ ├─bash,26470
│ │ └─watch,673 df
│ └─bash,26716
│   └─watch,727 netstat

From the OS perspective, there are no sessions or windows — just the tmux server with child bash processes (one per pane). Tmux itself manages the mapping of panes to windows and sessions.


Changing Key Bindings

Config File Location

Tmux looks for configuration in this order:

  1. ~/.tmux.conf (per-user)
  2. /etc/tmux.conf (system-wide)

If ~/.tmux.conf is missing, default key bindings are used. To revert to defaults, simply rename or remove ~/.tmux.conf.

Applying Config Changes

Edit or create the config file, then either:

  • Detach and reattach to tmux.
  • If settings don’t take effect: exit tmux, kill all sessions (killall tmux), and restart. Be careful — this kills any running commands in tmux.

Finding Config Files on Your System

On Debian:

dpkg -L tmux

General search:

find / -xdev -type f -iname "tmux.conf"
find / -type f -iwholename "*tmux*" | egrep conf

Note on -xdev: Stays within the same filesystem. Omit it if your config might be on a different partition. -xdev and -mount are equivalent.

Pre-Built Config File Locations

Debian (typical):

/usr/share/doc/tmux/examples/h-boetes.conf
/usr/share/doc/tmux/examples/n-marriott.conf
/usr/share/doc/tmux/examples/screen-keys.conf
/usr/share/doc/tmux/examples/t-williams.conf
/usr/share/doc/tmux/examples/tmux.vim
/usr/share/doc/tmux/examples/vim-keys.conf

Other distributions:

/usr/share/tmux/h-boetes.conf
/usr/share/tmux/n-marriott.conf
/usr/share/tmux/screen-keys.conf
/usr/share/tmux/t-williams.conf
/usr/share/tmux/tmux.vim
/usr/share/tmux/vim-keys.conf

Note on Arch: The config file might be tmux.conf (without the leading dot).


Option 1: Change Prefix to Ctrl-a

This is the Arch Linux recommended change. Only the prefix key changes — all other bindings stay the same.

Add this to ~/.tmux.conf:

unbind C-b
set -g prefix C-a
bind a send-prefix

Now use Ctrl-a everywhere you would have used Ctrl-b. See the key bindings reference below.


Option 2: Full Screen-Like Bindings

Changes the prefix to Ctrl-a and remaps many other keys to match screen’s behavior.

Debian:

cp /usr/share/doc/tmux/examples/screen-keys.conf ~/.tmux.conf

Other distros:

cp /usr/share/tmux/screen-keys.conf ~/.tmux.conf

See the screen-like key bindings reference below.

There is not much difference between Option 1 and Option 2. Option 2 just adds more screen-compatible mappings on top of the prefix change.


Key Bindings: Ctrl-a — Default Keys

These are the bindings when you only change the prefix to Ctrl-a (Option 1) but keep the default tmux key mappings.

Help & Info

Key Binding Action
Ctrl-a ? Show help
Ctrl-a t Show clock (dismiss with Enter or q)
Ctrl-a q Flash pane numbers

Pane Management

Key Binding Action
Ctrl-a " Horizontal split
Ctrl-a % Vertical split
Ctrl-a o Cycle to next pane
Ctrl-a Arrow Keys Move to adjacent pane
Ctrl-a Esc+Arrow Keys Resize current pane
Ctrl-a { Swap pane position up
Ctrl-a } Swap pane position down
Ctrl-a z Zoom in/out of pane
Ctrl-a x Kill current pane (confirms with y)

Window/Tab Management

Key Binding Action
Ctrl-a c Create new window/tab
Ctrl-a n Next window/tab
Ctrl-a p Previous window/tab
Ctrl-a <number> Switch to window by number
Ctrl-a Space Cycle through layouts
Ctrl-a Esc+<1-5> Switch to a specific layout (5 available)
Ctrl-a " Window selection menu (scroll with arrows, press Enter)
Ctrl-a k Kill current window and all panes (confirms with y)
Ctrl-a , Rename current window/tab

Session Management

Key Binding Action
Ctrl-a d Detach from session
Ctrl-a $ Rename current session

Scrollback & Copy Mode

Key Binding Action
Ctrl-a PageUp/PageDown Scroll pane history (q to exit)
Ctrl-a [ Enter copy mode (line-by-line scrolling, arrow keys to navigate)

Custom Extras (From Provided Config)

Key Binding Action
Ctrl-a Ctrl-s Toggle sync-panes
Ctrl-Shift Left/Right Reorder window/tab position (no prefix needed)
Ctrl-a O Disable pane input (think “O” = “0” = off)
Ctrl-a I Enable pane input (think “I” = “1” = on)
Ctrl-a R Respawn pane (respawn-pane -k)

Key Bindings: Screen-Like (Favorites)

These apply to the config files with “fav” in the filename (both Ctrl-a and Ctrl-q prefix variants). For the Ctrl-q variant, substitute Ctrl-q wherever you see Ctrl-a.

Help & Info

Key Binding Action
Ctrl-a t Show clock (dismiss with Enter or q)
Ctrl-a q Flash pane numbers

Pane Management

Key Binding Action
Ctrl-a | Horizontal split
Ctrl-a % Vertical split
Ctrl-a o Cycle to next pane
Ctrl-a Arrow Keys Move to adjacent pane
Ctrl-a Esc+Arrow Keys Resize current pane
Ctrl-a { Swap pane position up
Ctrl-a } Swap pane position down
Ctrl-a z Zoom in/out of pane
Ctrl-a k Kill current pane (confirms with y)
Ctrl-a K Kill current window/tab and all panes (confirms with y)

Window/Tab Management

Key Binding Action
Ctrl-a c Create new window/tab
Ctrl-a n Next window/tab
Ctrl-a p Previous window/tab
Ctrl-a <number> Switch to window by number
Ctrl-a :next-layout Enter Cycle to next layout (not as simple as Space in default mode)
Ctrl-a Esc+<1-5> Switch to a specific layout (5 available)
Ctrl-a " Window selection menu (scroll with arrows, press Enter)
Ctrl-a A Rename current window/tab

Session Management

Key Binding Action
Ctrl-a d Detach from session
Ctrl-a x Exit session — kills all panes/pttys (confirms with y)
Ctrl-a $ Rename current session

Scrollback & Copy Mode

Key Binding Action
Ctrl-a PageUp/PageDown Scroll pane history (q to exit)
Ctrl-a [ Enter copy mode

Custom Extras (From Provided Config)

Key Binding Action
Ctrl-a Ctrl-s Toggle sync-panes
Ctrl-Shift Left/Right Reorder window/tab position (no prefix needed)
Ctrl-a O Disable pane input (think “O” = “0” = off)
Ctrl-a I Enable pane input (think “I” = “1” = on)
Ctrl-a R Respawn pane (respawn-pane -k)

Byobu with Tmux

Byobu can use tmux as its backend instead of screen:

apt-get install byobu
apt-get install tmux

byobu-tmux
man byobu-tmux

Plain tmux is generally preferred, but this option exists if you want byobu’s enhancements with tmux’s engine.

Install order (byobu then tmux) probably doesn’t matter.


Starting Tmux on Login

Don’t do this. Run tmux manually each time so you can control which session you attach to.

For more information, see the Arch Wiki: https://wiki.archlinux.org/index.php/tmux

Leave a Reply

Your email address will not be published. Required fields are marked *