Useful tmux Commands

tmux (or terminal multiplexer) is used to split the current terminal screen into multiple “windows”. While the full manual is easily found online, here’s a quick reference card for my frequently used commands for tmux:

Useful pre-requisite (enables mouse support)

  1. Navigate to your home folder (~)
  2. Create a file named .tmux.conf with contents:
    set -g mouse on
  3. Restart tmux server:
    tmux kill-server

Start new session

List existing sessions (session ID is before the colon)
tmux list-sessions

Open existing session with session ID XXXXX
tmux attach -t XXXXX

Vertical split / Add pane to right (switch using mouse clicks)
Ctrl + B %

Horizontal split / Add pane to below (switch using mouse clicks)
Ctrl + B "

New window (switch using mouse in “taskbar” at the bottom of terminal)
Ctrl + B c

Scroll to Top