Tmux cheat sheet

49 shortcuts in 10 lessons

Reading a list won't make them stick. ShortcutFoo has you type each shortcut, then brings it back just before you'd forget it.

Prompt I

4 shortcuts
  • tmux
    Start new session from prompt
  • tmux new -s name
    Start new session with name 'name' from prompt
  • tmux a
    Attach session from prompt
  • tmux ls
    List session from prompt

Sessions I

3 shortcuts
  • C-bs
    List sessions
  • C-b$
    Name session
  • C-b:new
    New session

Windows I

4 shortcuts
  • C-bc
    Create window
  • C-bw
    List windows
  • C-bn
    Next window
  • C-bp
    Previous window

Windows II

3 shortcuts
  • C-bf
    Find window
  • C-b,
    Name window
  • C-b&
    Kill window

Panes I

5 shortcuts
  • C-b%
    Vertical split
  • C-b"
    Horizontal split
  • C-bo
    Swap panes
  • C-bq
    Show pane numbers
  • C-bx
    Kill pane

Panes II

4 shortcuts
  • C-bSPACE
    Toggle between layouts (space)
  • C-b{
    Move current pane left
  • C-b}
    Move current pane right
  • C-bz
    Toggle pane zoom

Misc I

6 shortcuts
  • tmux a -t name
    Attach session to named 'name' from prompt
  • tmux kill-session -t name
    Kill session named 'name' from prompt
  • C-bd
    Detach
  • C-bt
    Big clock
  • C-b?
    List shortcuts
  • C-b:
    Prompt

Agents in Panes I

7 shortcuts
  • C-bUP
    Move to pane above
  • C-bDOWN
    Move to pane below
  • C-bLEFT
    Move to pane left
  • C-bRIGHT
    Move to pane right
  • C-b;
    Last active pane
  • C-b!
    Break pane into its own window
  • C-bE
    Spread panes out evenly

Agents in Panes II

6 shortcuts
  • C-b[
    Enter copy mode
  • C-bPAGEUP
    Enter copy mode and scroll up
  • C-b]
    Paste most recent buffer
  • C-b=
    Choose a buffer to paste
  • C-bm
    Mark pane
  • C-bM
    Clear marked pane

Juggling Sessions

7 shortcuts
  • C-b(
    Previous session
  • C-b)
    Next session
  • C-bL
    Last session
  • C-bl
    Last window
  • C-b1
    Go to window 1
  • C-bD
    Choose a client to detach
  • C-b~
    Show messages