Skip to content

Instantly share code, notes, and snippets.

@DaniSancas
Last active December 18, 2024 16:29
Show Gist options
  • Save DaniSancas/6ce1ea08ad0b7797578c2c105e336b39 to your computer and use it in GitHub Desktop.
Save DaniSancas/6ce1ea08ad0b7797578c2c105e336b39 to your computer and use it in GitHub Desktop.
Tmux cheatsheet

Basics

Action Key Tip
List available sessions tmux ls
Start new (unnamed) session tmux
Start a named session or attach to existing one tmux new -A -s <name>
Reattach to named session tmux attach -d -t <name>
Action Key Tip
Open command palette within Tmux <C-b>
Rename session <C-b>$
Dettach from session <C-b>d It will still live
Show interative list of sessions <C-b>s Similar to tmux ls but interactive
Show interactive list of sessions and their windows <C-b>w
Kill current session : kill-session
Kill specific session : kill-session -t <name>
Kill current window : kill-window
Kill specific window : kill-window -t <number>

Windows

Action Key Tip
Create window <C-b>c
Rename current window <C-b>,
Close current window <C-b>&
Action Key Tip
Jump to window number <C-b>0..9
Jump to previous window <C-b>p
Jump to next window <C-b>n
Jump to last active window <C-b>l

Panes

Action Key Tip
Split window horizontally (new pane) <C-b>%
Split window horizontally (new pane) <C-b>"
Close current pane <C-b>x
Convert pane to a window <C-b>!
Action Key Tip
Show pane numbers <C-b>q
Jump to pane number <C-b> q 0..9
Jump to left/right/up/down pane <C-b> <arrow keys> With vim-tmux-navigator plugin: <C>hjkl
Toggle zoom in/out <C-b>z
Toggle pane layouts <C-b><Space>

Copy mode

Action Key Tip
Enter copy mode <C-b>[
Exit copy mode q
Move cursor Vim motions: hjkl, w, b
Start visual selection v Custom mapping
Toggle line/block selection <C-v> Custom mapping
Copy selection y Custom mapping and tmux-yank plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment