Skip to content

Instantly share code, notes, and snippets.

@avelino
Created October 8, 2012 10:57
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save avelino/3851947 to your computer and use it in GitHub Desktop.
Save avelino/3851947 to your computer and use it in GitHub Desktop.
tmux cheat sheet

tmux - terminal multiplexer

Managing tmux sessions:

$ tmux      # start tmux server
$ tmux at   # attach running sessions to a terminal
$ tmux ls   # list running tmux sessions

Sharing sessions between terminals:

$ tmux new -s session_name # make new named session
$ tmux at -t session_name  # attach to exist session (allowing shared sessions)

Commands (used within a running tmux session):

c  - create new window
n/l - next/last window
&  - kill current window

%  - split window, adding a vertical pane to the right
"  - split window, adding an horizontal pane below
←/→ - move focus to left/right pane
↑/↓ - move focus to upper/lower pane

!  - Break current pane into new window
x  - Kill the current pane.
d  - detach the current client

[  - enter copy mode (then use emacs select/yank keys)
    * press CTRL-SPACE or CTRL-@ to start selecting text
    * move cursor to end of desired text
    * press ALT-w to copy selected text

]  - paste copied text

?  - show tmux key bindings

NOTE:

  • All commands need to be prefixed with the action key.
  • By default, this is CTRL-b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment