tmux - cheat sheet
Sessions
start a new Session
tmuxtmux new:newtmux new -s mysessionname
list Sessions
tmux lsCtl+b s
attach to an already running Session
last session:
tmux a
named session:
tmux a -t mysessionname
rename a session
ctl+b $
detach a session
ctl+b d
kill / del a session
ctl+b :to bring up the command line for tmux then typekill-sessionto kill the current session.tmux kill-session -adeletes all sessions except currenttmux kill-session -t mysessionToDel
list all sessions (and optionally switch)
ctl-b s
While inside list of sessions
x- will kill (with confirmation the currently highlighted session)
move a session
ctl+b (move to the next sessionctl+b )move to the previous sessionctl+b wpreview sessions & windows (allowing you to then select one to move to)
list all attached clients
ctl+b Dwhich ever one you select will then be removed
Windows
create window
ctl+b c
rename current window
ctl+b ,
close current window
ctl+b &
moving between windows
next
ctl+b n
previous
ctl+b p
by number
ctl+b 0-9
Panes
toggle between panes
ctl+b ;
split pane vertically
ctl+b %
split pane horizontally
ctl+b "
show pane numbers (temp)
ctl+b q
switch to pane by number
ctl+b 0-9
close pane
ctl+b x close current pane
move to pane in direction
ctl+b arrowKey
toggle pane zoon (show only the current pane)
ctl+b z
convert pane to window
ctl+b !
toggle between pane layouts (horizontal vs vertical)
ctl+b spacebar
Copy Mode
:set -g mode-keys vi set use of vi keys in buffer
ctl+b [ Enter copy mode
ctl+b ] paste text
use arrow keys to navigate
ctl+spacestart selectionctl+w|alt+wcopy selection to tmux buffer<prefix>+=— show tmux buffer contents
ctl+b PgUp Enter copy mode and scrool up one page
q exit copy mode
Enter copy the current selection
Esc clear selection
