Skip to content

Instantly share code, notes, and snippets.

@socketwiz
Created May 21, 2012 16:02
Show Gist options
  • Save socketwiz/2763032 to your computer and use it in GitHub Desktop.
Save socketwiz/2763032 to your computer and use it in GitHub Desktop.
TMUX cheat sheet

named session
tmux new -s <name>
add -d to run in the background

command PREFIX
ctrl-b

detach
PREFIX d

list sessions
tmux ls

attach to sessions
tmux attach -t <name>

kill a session
tmux kill-session -t <name>

create a new session (-s) with a window (-n)
tmux new -s <name> -n <name>

create a new window within a session
PREFIX c

move between windows
PREFIX n (next)
PREFIX p (previous)
PREFIX <num> (numbered window)
PREFIX f (find window by name)
PREFIX , (rename a window)
PREFIX w (display a list of windows)
PREFIX & (exit a window with confirmation)

working with panes
PREFIX % (divide window vertically)
PREFIX " (divide window horizontally)
PREFIX o (cycle through panes)
PREFIX up,down,left,right (cycle through panes)
PREFIX spacebar (cycle through pane layouts)
PREFIX x (kill the pane)

command mode
PREFIX :
PREFIX ? (list of predefined keybindings)

copy/paste
PREFIX [ (copy mode)
PREFIX ] (paste mode)
PREFIX = (list all paste buffers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment