Tmux
Getting Started
What is tmux?
tmux is a program which runs in a terminal and allows multiple other terminal programs to be run inside it
Why tmux?
- Work with multiple programs and shells together in one terminal, a bit like a window manager.
Concepts & terms
The tmux server and clients
-
tmux server: tmux keeps all its state in a single main process, called the tmux
server. -
tmux client:
- Users attach to the tmux
serverby starting aclient - Attaches a tmux
sessionfrom an outsideterminalsuch as xterm(1)
- Users attach to the tmux
Sessions, windows and panes
- Session: Groups 1+
windowstogether - Window: Groups 1+
panestogether, linked to 1+sessions - Pane: Contains a
terminaland running program, appears in onewindow
Quick start
Help
C-b ?
tip
What does C-b ? mean?
It means:
- Press
Ctrlandb - Then press
?(It’sShift+/)
tip
How to exit the help menu of Tmux?
Press q
Start a new session
tmux
Detach from the current session (inside a tmux session)
C-b d
Start a new named session
tmux new -s SESSIONNAME
List existing sessions
tmux ls
Attach to the most recently used session
tmux attach
Create a new window (inside a tmux session)
C-B c
Switch between sessions and windows (inside a tmux session)
C-B w
Kill a session by name
tmux kill-session -t SESSIONNAME
Tips & Tricks
Copy and Paste
Hold Shift / Select text (with mouse) / Ctrl + Shift + C / Ctrl + Shift + V