tmux new -s <session_name>
tmux ls
tmux attach -t <session_name>
Hit LEADER + d
to detach from session.
Delete a session with tmux kill-session -t <session_name>
.
This leader key is your gateway to run any tmux shortcut.
By default bound to CTRL-B
, but tmux has a config file and you can rebind it.
Inside of each session, you can have 1 or more windows.
You can create new window by pressing LEADER + c
,
and you can name them with LEADER + ,
You can cycle between them like this:
- next -
LEADER + n
- previous -
LEADER + p
- specific -
LEADER + <num>
You can list all windows, and select with arrows and enter, with LEADER + w
You can delete any window with exit
command or CTRL + d
You can split a window in multiple independent terminals.
LEADER + %
LEADER + "
You can cycle through panes:
LEADER + o
LEADER + q
+<numb>
Zoom in/out a pane
LEADER + z
Kill a pane
LEADER + x
Press LEADER + [
+ arrow or page keys. You can exit with ESC
.
- Enter
LEADER + [
for copy mode - Hit
CTRL + SPACE
for select mode and select with arrow keys in all directions - Hit
ALT + w
to copy LEADER + ]
to paste the selection
- Clock with
LEADER + t
- Combo cheat sheets with
LEADER + ?
# switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Enable mouse mode (tmux 2.1 and above)
set -g mouse on