Back to Top
tmux help
Select excerpts from man, windows & panes using vi-mode and my tmux.conf file
Tmux Cheat Sheet
Table of Contents
tmux Configuration
Following commands are derived from my tmux.conf. bind-key is mapped as Ctrl+Shift+Z
Ctrl+Shift+Z v | Split Window Vertically |
Ctrl+Shift+Z h | Split Window Horizontally |
Ctrl+Shift+Z h or Alt+h or Alt+Left | Focus on pane left |
Ctrl+Shift+Z j or Alt+j or Alt+Down | Focus on pane below |
Ctrl+Shift+Z k or Alt+k or Alt+Up | Focus on pane above |
Ctrl+Shift+Z l or Alt+l or Alt+Right | Focus on pane right |
Ctrl+Shift+Z J | Decrease Pane 5 lines |
Ctrl+Shift+Z K | Increase Pane 5 lines |
Ctrl+Shift+Z H | Decrease Pane 5 columns |
Ctrl+Shift+Z L | Increase Pane 5 columns |
Shift+Right | Next Window |
Shift+Left | Previous Window |
Initiate block copy mode with Ctrl+Shift+Z [
Use arrow keys to move around the shell window to perform the following.
Ctr+Shift+Z v | begin selection, enter visual mode |
Ctr+Shift+Z y | yank (copy) selection to buffer |
After yanking the selection to the buffer and returning to the command prompt can copy from tmux buffer to system clipboard
Ctr+Shift+Z y | copy from buffer to clipboard |
Shift+Insert | copy from clipboard to command line |
Commands
C-b | Send the prefix key (C-b) through to the application. |
C-o | Rotate the panes in the current window forwards. |
C-z | Suspend the tmux client. |
! | Break the current pane out of the window. |
" | Split the current pane into two, top and bottom. |
# | List all paste buffers. |
$ | Rename the current session. |
% | Split the current pane into two, left and right. |
& | Kill the current window. |
' | Prompt for a window index to select. |
, | Rename the current window. |
- | Delete the most recently copied buffer of text. |
. | Prompt for an index to move the current window. |
0 to 9 | Select windows 0 to 9. |
: | Enter the tmux command prompt. |
; | Move to the previously active pane. |
= | Choose which buffer to paste interactively from a list. |
? | List all key bindings. |
D | Choose a client to detach. |
[ | Enter copy mode to copy text or view the history. |
] | Paste the most recently copied buffer of text. |
c | Create a new window. |
d | Detach the current client. |
f | Prompt to search for text in open windows. |
i | Display some information about the current window. |
l | Move to the previously selected window. |
n | Change to the next window. |
o | Select the next pane in the current window. |
p | Change to the previous window. |
q | Briefly display pane indexes. |
r | Force redraw of the attached client. |
s | Select a new session for the attached client interactively. |
L | Switch the attached client back to the last session. |
t | Show the time. |
w | Choose the current window interactively. |
x | Kill the current pane. |
{ | Swap the current pane with the previous pane. |
} | Swap the current pane with the next pane. |
~ | Show previous messages from tmux, if any. |
Page Up | Enter copy mode and scroll one page up. |
Up, Down, Left, Right | Change to the pane above, below, to the left, or to the right of the current pane. |
M-1 to M-5 | Arrange panes in one of the five preset layouts: even-horizontal, even-vertical, main-horizontal, main-vertical, or tiled. |
M-n | Move to the next window with a bell or activity marker. |
M-o | Rotate the panes in the current window backwards. |
M-p | Move to the previous window with a bell or activity marker. |
C-Up, C-Down, C-Left, C-Right | Resize the current pane in steps of one cell. |
M-Up, M-Down, M-Left, M-Right | Resize the current pane in steps of five cells. |
Windows & Panes
^ | Back to indentation |
G | Bottom of history |
Escape | Clear selection |
Enter | Copy selection |
j | Cursor down |
h | Cursor left |
l | Cursor right |
L | Cursor to bottom line |
M | Cursor to middle line |
H | Cursor to top line |
k | Cursor up |
d | Delete entire line |
D | Delete/Copy to end of line |
$ | End of line |
: | Go to line |
C-d | Half page down |
C-u | Half page up |
f | Jump forward |
t | Jump to forward |
F | Jump backward |
T | Jump to backward |
; | Jump again |
, | Jump again in reverse |
C-f | Next page |
W | Next space |
E | Next space, end of word |
w | Next word |
e | Next word end |
p | Paste buffer |
C-b | Previous page |
b | Previous word |
B | Previous space |
q | Quit mode |
v | Rectangle toggle |
C-Down or C-e | Scroll down |
C-Up or C-y | Scroll up |
n | Search again |
N | Search again in reverse |
? | Search backward |
/ | Search forward |
0 | Start of line |
Space | Start selection |
g | Top of history |