SnapSummary logo SnapSummary Try it free →
you need to learn tmux RIGHT NOW!!
NetworkChuck · Watch on YouTube · Generated with SnapSummary · 2026-10-29

tmux: A Practical Beginner’s Guide 🖥️

tmux is a terminal multiplexer: it lets you run multiple terminal sessions, windows, and panes inside one terminal. Its standout feature is that work can keep running on a remote machine after you disconnect—and you can reattach later.

1. Install and start tmux

On Ubuntu or another Debian-based system:

sudo apt install tmux

Start tmux:

tmux

You can use it locally or SSH into a Linux server first and run it there.

2. Keep work running after you disconnect

Start a long-running task inside tmux, such as a ping:

ping example.com

Detach without stopping the task:

  1. Press Ctrl+B
  2. Release the keys, then press D

Reattach to the most recent session:

tmux attach

Or use the shortcut:

tmux a

This is useful when your SSH connection drops or you want to resume work from another device.

3. Sessions: separate workspaces

List existing sessions:

tmux ls

Create a named session:

tmux new -s Bob

Attach to a specific session:

tmux attach -t Bob

Kill a specific session:

tmux kill-session -t Bob

To stop the tmux server and all its sessions:

tmux kill-server

4. The three tmux layers

  • Session: A workspace that can contain multiple windows.
  • Window: A terminal screen within a session; a new session starts with one.
  • Pane: A section of a window, created by splitting the screen.

5. Essential key bindings

The default tmux prefix key is Ctrl+B. Press it first, release it, then press the next key.

Panes

Action Keys
Split into side-by-side panes Ctrl+B, then %
Split into stacked panes Ctrl+B, then "
Move between panes Ctrl+B, then an arrow key
Show pane numbers Ctrl+B, then Q; press a number to select a pane
Resize the active pane Ctrl+B, then Ctrl+arrow
Choose a preset pane layout Ctrl+B, then Alt+1 through Alt+5
Close the active pane Ctrl+B, then X, then confirm

Windows

Action Keys
Create a window Ctrl+B, then C
Move to the next window Ctrl+B, then N
Rename the current window Ctrl+B, then ,
Browse windows and sessions Ctrl+B, then W
Close the current window Ctrl+B, then &, then confirm

6. Optional configuration and copy mode

Create or edit ~/.tmux.conf to enable mouse support and Vim-style navigation in copy mode:

set -g mouse on
setw -g mode-keys vi

To copy text using the keyboard:

  1. Press Ctrl+B, then [ to enter copy mode.
  2. Navigate to the start of the text.
  3. Press Space to begin selecting.
  4. Move to the end of the text and press Enter to copy it into tmux’s buffer.
  5. Press Ctrl+B, then ] to paste.

Key takeaway

You don’t need to learn every feature at once. Even using tmux just to start a task, detach, and reattach later can make remote Linux work much more reliable.

📬 Never miss a NetworkChuck video — every new upload summarized in your inbox. Follow free

Summarize any YouTube video instantly

Get AI-powered summaries, timestamps, and Q&A for free.

Generate your own summary →
More summaries →