⚡ This is the AMP version of this page. View full version

Tmux

Published: 7/7/2025 | Updated: 6/4/2025

TMux stands for terminal multiplexer1. It allows you to switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal1.

It lets you create multiple:

  1. Sessions
  2. Windows
  3. Panes

Basic Commands

CommandDescription
tmuxStart a new tmux session
Ctrl + b + dDetach from the current session
tmux lsList all sessions
tmux a -t 0Attach to session 0
tmux new -s awsCreate new session named “aws”
tmux kill-session -t awsKill session named “aws”

Pane Management

ShortcutAction
Ctrl + b + %Split vertically
Ctrl + b + "Split horizontally
Ctrl + b + arrow keyMove around panes
Ctrl + b + qShow pane index numbers
Ctrl + b + xKill current pane

Window Management

ShortcutAction
Ctrl + b + cCreate new window in the same session
Ctrl + b + wList all sessions and windows
Ctrl + b + ,Rename the current window
Ctrl + b + nMove to next window sequentially
Ctrl + b + [number]Move to window number [number]
Ctrl + b + &Kill current window
Ctrl + b + w followed by Ctrl + b + xKill selected window

Note: The prefix key Ctrl + b is the default command prefix in tmux. All tmux commands start with this key combination.