tmux

Cheat sheet

Sessions

tmux new-session [-s my-session]
Start a new session (alias: new).
tmux list-sessions
List sessions (alias: ls).
tmux attach-session [-t my-session]
Attach to a session (alias: attach).
tmux kill-session -t my-session
Kill a session.
Ctrl-b s
List sessions and switch to one interactively.
Ctrl-b )
Switch to the next session.
Ctrl-b d
Detach from the session.

Windows

Ctrl-b c
Create a window.
Ctrl-b ,
Rename the window.
Ctrl-b n
Switch to the next window.
Ctrl-b &
Close the window.

Panes

Ctrl-b %
Split the current pane in two, left-to-right.
Ctrl-b "
Split the current pane in two, top-to-bottom.
Ctrl-b o
Switch to the next pane.
Ctrl-b ;
Toggle the last active pane.
Ctrl-b !
Convert the pane to a window.
Ctrl-b x
Close the pane.

Scrolling

Ctrl-b [
Enter copy/scrolling mode.
q
Exit copy/scrolling mode.
:setw -g mouse on
Enable scrolling with the mouse.