brew install tmux
Create session 0
tmux
Create session with name my-session The name of session is displayed in square brackets at the bottom-left corner
tmux new -s my-session
Session list:
tmux ls
Select a new session for the attached client interactively:
<C-b s>
Attach:
tmux attach -t my-session
Detach:
<C-b d>
or
tmux detach
Create new window:
<C-b c>
Next window: <C-b n>
Previous window: <C-b p>
To the window with number 2: <C-b 2>
Close window:
<C-b x>
or
exit
The window could be splitted into panes.
Split horizontally:
<C-b ">
or
tmux split-window -h
Split vertically:
<C-b %>
or
tmux split-window -v
Switch between panes:
<C-b Left>
Change pane size:
<C-b C-Left>