Default prefix “key” is Ctrl + b.
Sessions
Creating a new named session:
tmux new-session -s <name>
Listing all sessions:
tmux list-session
Attach to a running session:
tmux attach -t <name>
To detach from a session, press: <Prefix> + d
Renaming a session:
tmux rename-session -t <old-name> <new-name>
Kill a session:
tmux kill-session -t <name>
Windows
To create a new window, within a session press: <Prefix> + c.
To list all windows, press: <Prefix> + w. The list also allows us to select a window using UP, DOWN and ENTER.
To rename a window, press: <Prefix> + ,.
To terminate a window, press: <Prefix> + &.
Copy-Mode
To enter copy mode, press: <Prefix> + [.
Begin selection with: <Prefix> + Space.
Hit ENTER to copy the selected text to tmux’s clipboard.
Paste with <Prefix> + ].