~/.tmux.conf
Default prefix: ^b
- Read the man page:
man tmux
- List all key bindings:
tmux list-keys | less
- List running sessions:
tmux list-sessions
- New named session:
tmux new -s NAME
- Switch sessions:
tmux switch -t NAME
- Attach to a session:
tmux attach -t NAME
- Detach current session:
^b d
- Rename current session:
^b $
- Saving sessions and restoring sessions a reboot:
I don't think this is a standard tmux feature. Here are some projects to check out that provide this functionality: tmuxinator, tmux-resurrect, or plain old bash scripts
- Create a new window:
^b c
- List windows:
^b w
- Rename a window:
^b ,
- Close a window:
^b &
- Split pane vertical (opens new pane to the right):
^b %
- Split pane horizontal (opens new pane below):
^b "
- Switch between panes:
^b up|down|left|right
- up, down, left, right are the arrow keys - Swap panes:
^b {
or^b }
- Resize pane:
^b :resize-pane -U|D|L|R NUM
- Up, Down, Left, Right, NUM cells - Kill pane:
^b x
- Enter scroll mode:
^b [
- Quit scroll mode:
q
- Scroll in scroll mode:
j
(down),k
(up), or page up/down
- Enter copy mode:
^b [
- Begin selection:
space
- End selection (and copy text):
enter
- Paste test:
^b ]