Since switching to vim, I've found myself really enjoying keyboard-based user interfaces. So instead of managing multiple terminal sessions in iTerm, I have started using tmux. I'm writing this cheat sheet as I learn. Check back often.

N.B. Keep in mind, everything in tmux is case sensitive.

Panes

command description
ctrl-b % Split the current pane into 2 panes vertically
ctrl-b " Split the current pane into 2 panes horizontally
ctrl-b o Switch to the "next" pane
ctrl-b arrow Switch to the pane in the direction of arrow

Windows

command description
ctrl-b c Create a new window
ctrl-b n Go to the next window
ctrl-b p Go to the previous window
ctrl-b n Switch to the window numbered n

Sessions

command description
ctrl-b d Detach current session
tmux ls List all of the running sessions inside tmux
tmux attach -t n or tmux a -t n Attach to the session with the number n (-t stands for "target")
tmux kill-session -t n Kill the session with the number n. You shouldn't need to do this very often; just exit out of the running processes, and tmux will quit itself