• pane: a pane is an independent subregion of the entire terminal screen

  • window: a window is like a virtual desktop which may contain many panes

  • session: a tmux session may contain many windows

Outside a session

Command Result
tmux start a session
tmux ls list the sessions that are running in the background
tmux a open last session
tmux a -t <number> re-attach (connect) to a session by its number
tmux new -s <session_name> give the session a meaningful name (instead of a numerical one starting with 0)
tmux rename-session -t 0 <session_name> rename an existing session
tmux kill-session -t <number> delete a session according to its number
tmux kill-server delete all sessions


Inside a session

All commands in tmux are triggered by a prefix key followed by a command key. By default, the tmux uses C-b as a prefix key.

Pane-associated commands

Command Result
C-b % split into a left and a right pane
C-b " split into a top and a bottom pane
C-b <arrow key> navigate panes
C-b q show each pane number and press the number to select the pane
C-b z make a pane go full screen / shrink a pane back to its original size
exit or C-d close a pane

Window-associated commands

Command Result
C-b c create a new window
C-b p switch to the previous window (according to the order in the status bar)
C-b n switch to the next window (according to the order in the status bar)
C-b <number> go to a window directly by typing its number
C-b w select a window from the window list
C-b , rename the current window
C-b & close the current window

Session-associated commands

Command Result
C-b d detach the current session (leave the session running in the background)
C-b $ rename the current session
C-b s select a session from the session list


- End -