Terminal multiplexer (Tmux), is a command line that helps you to run or view multiple commands in single terminal window.

Running commands in the terminal helps you to execute tasks easily and faster than you could graphically.

Command prompt, which is a similar app to tmux, is not good at multi tasking as compared to tmux.

Tmux helps you to simultaneously run and view multi commands in a single terminal window.

Below are the commands and their actions.

Shortcut Action
General
¹Ctrl + b Default prefix key
t Show time (ESC returns to the terminal)
: Enter a command (Example: “:new-session”)
list-commands List all commands that tmux supports
Tmux Terms
Pane An open command prompt (or pseudo-terminal). Panes may appear side by side or vertically stacked inside a window.
Window Your view of open panes
Session A set of open windows
Client The background process that displays your session
Server A single server manages all open sessions (Servers and clients are separate processes that each communicate through a socket in /tmp.)
Creating and Managing Panes
% Split screen or pane in half vertically, creating a new pane on the right
Split screen or pane in half horizontally, creating a new pane at the bottom
Switch to the adjacent pane
o Switch to the next pane
q Show pane numbers (when numbers appear, press number to switch to that pane)
{ Move current pane to the left
} Move current pane to the right
x Close the current pane
Ctrl + Resize pane in steps of one cell
Alt + Resize pane in steps of five cells
Alt + 1 Arrange panes in the even-horizontal preset layout
Alt + 2 Arrange panes in the even-vertical preset layout
Alt + 3 Arrange panes in the main-horizontal preset layout
Alt + 4 Arrange panes in the main-vertical preset layout
Alt + 5 Arrange panes in the tiled preset layout
Creating and Managing Windows
c Create a new window
! Detach pane into a new window
n Switch to the previous window (in order of creation)
p Switch to the next window (in order of creation)
l Switch to the window used most recently
w List all windows and their corresponding numbers
Switch to the corresponding window
, Rename current window
i Display info about the current window
f Search for text in open windows (ESC exits the search)
Creating and Managing Sessions
new-session Create a new session
$ Rename current session
list-sessions List open sessions
attach-session Create a new client and attach it to the specified session (-t target-session)
detach-client -s target-session Detach clients attached to the current session
kill-session Destroy the current or specified session
¹To activate a shortcut, you must first press and release the prefix key, then press the shortcut key.