tmux Quick Start Guide

Contents
๐งช Quick Guide to tmux
tmux
(terminal multiplexer) lets you run multiple terminal sessions in one window โ detach and reattach them at will. It’s ideal for remote work and multitasking in the terminal.
๐ Start a New Session
|
|
This creates a new tmux session named mysession
.
๐ Reattach to a Session
List all available sessions:
|
|
Attach to the most recent session:
|
|
Attach to a specific session:
|
|
โจ๏ธ Common Keybindings
Press
Ctrl + b
first, then:
Key | Action |
---|---|
d |
Detach from session |
c |
Create a new window |
n |
Next window |
" |
Split pane horizontally |
% |
Split pane vertically |
x |
Close the current pane |
[ |
Enter scrollback mode |
: |
Open command prompt |
๐งน Exit a Session
Kill a specific tmux session:
|
|
Or exit from inside tmux
:
|
|
๐ง Useful Aliases (.bashrc
or .zshrc
)
|
|
Pro tip
Tmux is perfect for long-running processes on servers. Detach with
Ctrl + b
, then d
, log out, and come back later!