Tmux Cheatsheet

Create session with a name

tmux new -s <name>

Attach to session with name

tmux attach -t <name>

List sessions

tmux ls
# or from within a tmux session:
ctrl+b s

Background session

ctrl+b d

Rename current session

ctrl+b $

Kill session

tmux kill-session -t <name>

Background session on remote host and close ssh session

return ~ .


Screen splitting

Horizontal split:

ctrl-b "

Vertical split:

ctrl-b %


Use tmuxinator for environment automation

Great tutorial here:

Use mouse to copy and paste in a pane

In iTerm2:

  1. Hold down the Option key and the alt key
  2. Drag your mouse with the left click to select a body of text in a particular pane

Use Command-c to copy and Command-v to paste