Create a new session (for the first time on your server) :
tmux
Attach to an existing session :
tmux a
Inside a session, you can
- Detach : Ctrl+b d
- Scroll : Ctrl+b PgUp/PgDown (quit with q) also can use mouse after first page up or down (see tips below to activate normal mouse scrolling)
- Copy mode : Ctrl+b [ (quit with q)
- Split horizontally : Ctrl+b “
- Split vertically : Ctrl+b %
- Switch pane : Ctrl+b arrow key
- Resize pane : Hold Ctrl+b + arrow keys
- Toggle zoom in pane : Ctrl+b + z
Tips
- Copy/pasting :
- Install xclip so buffer copied inside tmux are also available to X : sudo apt-get install xclip
- Select by using Shift + mouse selection
- Copy with Ctrl + Shift + C
- Use the mouse for scrolling : put set -g mouse on in ~/.tmux.conf, or if you are inside a tmux session, activate the command sequence CTRL+B+: and then type set -g mouse on
This will cause some trouble using copy/paste because selection is automatically used by tmux buffer : to avoid that, SHIFT + selection will use your local buffer.