-
Notifications
You must be signed in to change notification settings - Fork 1
Tmux Cheatsheet
Antoniy Chonkov edited this page Dec 28, 2019
·
1 revision
By default Tmux prefix key is set to Ctrl-b but we've remapped it to Ctrl-a.
-
tmux new: start new tmux session -
tmux new -s <name>: start new tmux sessions with specified name -
<prefix>-:: enter command mode -
<prefix>-?: show available commands and key bindings -
Ctrl-a-a: sendCtrl-aprefix to current shell (hold downCtrland pressatwice) -
<prefix>-l: sendsCtrl-lto the shell for 'clear screen' function to work
-
<prefix>-c: create new window -
<prefix>-C: create new window with specified name -
Alt-[h,l]: switch to previous/next window -
Alt-[Left,Right]: switch to previous/next window -
<prefix>-[1-9]: switch to specified window number
-
<prefix>-,: rename window -
Alt-Shift-Left: move window to the left -
Alt-Shift-Right: move window to the right
-
<prefix>-s: create new horizontal split pane -
<prefix>-v: create new vertical split pane -
<prefix>-S: create new horizontal split for whole window - if you have for example 2 vertical splits, this will make horizontal split beneath both, not just the current one. -
<prefix>-V: create new vertical split for whole window - if you have 2 or more horizontal splits, this will make vertical split to the right of all of them, not just the current one. -
<prefix>--: create horizontal split pane -
<prefix>-|: create vertical split pane -
<prefix>-_: create new horizontal split for whole window - if you have for example 2 vertical splits, this will make horizontal split beneath both, not just the current one. -
<prefix>-\: create new vertical split for whole window - if you have 2 or more horizontal splits, this will make vertical split to the right of all of them, not just the current one.
-
Ctrl-[h,j,k,l]: move to pane on the left/down/up/right -
<prefix>-[Left,Down,Up,Right]: move to pane on the left/down/up/right -
<prefix>-Shift-[h,j,k,l]: resize pane - press leade (Ctrl-a) without releasing Ctrl press (multiple times if needed)h, j, k or lto resize the pane in whatever direction needed.
-
<prefix>-x: kill pane -
Alt-z: toggle pane zoom - triggered once a pane becomes fullscreen and aZflag is shown in the window indicator in status bar, triggered second time - the layout is restored as before. -
<prefix>space: change pane layout -
<prefix>-a: synchronize all panes in the current window - all typed input will go to all panes
-
<prefix>-N: create new session with specified name -
<prefix>-w: show list of sessions and windows with preview and user can navigate to one withj,kand select withenter -
<prefix>-W: show lif of just session with preview and the user can navigate (j,l) to one and switch to it withenter -
<prefix>-d: detach from the current session -
<prefix>-D: show a list of attached terminal and choose one viaj,kto be detached and select withenter -
<prefix>-r: reload tmux config