Regular OSX terminal does not play well with all the keybindings. iTerm2 does this a little bit better, but not everything works as expected.
Start tmux
tmux
Start tmux by default when opening a iTerm2 terminal: Settings -> Profiles -> General: Send text at start: tmux attach -t init || tmux new -s init
Create a new tmux session You can not nest tmux sessions Execute this in outside a tmux session First example starts a new sessions with an index number Second example start a session with a name
tmux new
tmux new -t <name>
List tmux sessions
tmux ls
Detach from a tmux session
CTRL+B d
Attach to a tnux session
tmux a -t <indexorname>
Kill all tmux sessions
tmux kill-server
Split tmux window in panes %(vertical) "(horizontal)
CTRL+B %
CTRL+B "
Navigate between panes
CTRL+B <arrowkey>
Show pane indexes
CTRL+B q
Jump to a pane by index
CTRL+b q <index>
Resize panes
CTRL+B ALT+<arrow>
Kill current pane
CTRL+B x
Create new windows
CTRL+B c
Rename window
CTRL+B , # and enter name
Scroll thru windows
CTRL+B n
List and navigate between windows
CTRL+B w
Kill windows
CTRL+B w
# select window, hit x and confirm (y)es
Copy paste This requires the following tmux.conf line: setw -g mode-keys vi
# Enter copy mode
CTRL+B [
# use arrows to navigate terminal
# hit space to start selecting
# use arrow keys to select text
# hit enter
# to paste text:
CTRL+B ]