Reference : https://tmuxcheatsheet.com/
Prefix key: CTRL+SPACE
-
tmux
: Creates a new session and attaches to it -
tmux new -s my-session
: Creates the sessionmy-session
and attaches to it -
In
tmux
, use PREFIX:new
to create a new session -
In
tmux
, use PREFIX:new -s my-session
to create the sessionmy-session
-
tmux attach
: will reattach to the most recent session -
tmux attach -t my-session
: attaches tomy-session
-
PREFIX+d : detaches from current session
-
tmux ls
: lists all sessions (from the shell) -
PREFIX+s : lists all sessions (from tmux)
-
PREFIX+w : lists all sessions and allows to preview windows
-
tmux kill-session -t my-session
: kills/deletesmy-session
-
tmux kill-session -a
: kills/deletes all session except the current -
tmux kill-ses -a -t my-session
: kills/deletes all session exceptmy-session
-
PREFIX+C : New window
-
SHIFT+ALT+H : Cycles to the next window
-
SHIFT+ALT+L : Cycles to the previous window
-
PREFIX+& : Closes a window
-
PREFIX+% : Splits a window horizontally
-
PREFIX+" : Splits a window vertically
-
PREFIX+x : Closes the pane
-
ALT+arrows : Navigates between the panes
-
CTRL+h j k l : Navigates between the panes
-
PREFIX+{ : Moves the pane left within the window
-
PREFIX+} : Moves the pane right within the window
-
PREFIX+q : Displays pane numbers
-
PREFIX+q then
pane number
: makes the pane active -
PREFIX+z : Makes the active pane take the full window
-
PREFIX+! : Turns the active pane into a new window