Resize current pane width (holding second key is optional)
Ctrl+b x
Close current pane
Copy mode
Command
Description
: setw -g mode-keys vi
Use vi keys in buffer
Ctrl+b [
Enter the copy mode
Ctrl+b PgUp
Enter copy mode and scroll one page up
q
Quit copy mode
g
Go to top line
G
Go to bottom line
⬆︎
Scroll up
⬇︎
Scroll down
h
Move cursor left
j
Move cursor down
k
Move cursor up
l
Move cursor right
w
Move cursor forward one word
b
Move cursor backward one word
/
Search forward
?
Search backwards
n
Next keyword occurrence
N
Previous keyword occurrence
Space
Start selection
Esc
Clear selection
Enter
Copy selection
Ctrl+b ]
Paste contents of buffer_0
: show-buffer
display buffer_0 contents
: capture-pane
Copy entire visible contents of pane into a buffer
: list-buffers
Show all buffers
: choose-buffer
Show all buffers and paste selected
: save-buffer buffer.txt
Save buffer contents to buffer.txt
: delete-buffer -b 1
Delete buffer_1
Misc.
Command
Description
Ctrl+b :
Enter the command mode
: set -g OPTION
Set OPTION for all sessions
: setw -g OPTION
Set OPTION for all windows
Help
Command
Description
$ tmux info
Show every session, window, pane, and so on.
Ctrl+b ?
Show shortcuts
What is Tmux?
Tmux is a terminal multiplexer. For example you can open a tmux session and it
will keep all the processes running even if you close the terminal, so you can
later on attach back to the session and resume where you left off. This way you
can leave long lasting tasks running, for examples an
Irssi IRC client etc.
Besides that, tmux can serve as a window manager, you can split the terminal
into panes (think of split view), or open new windows (think of tabs). See my
post on how to install and use tmux for more
detailed info.
Use with Alfred
You can quickly search this guide from Alfred if
you setup a custom search.
Click here to add it automatically.
Or see instructions below how to add it manually.
How to add custom Alfred search manually
Pop open Alfred settings.
Go to "Web Search".
Click "Add Custom Search".
In the "Search URL" field paste:
https://clubmate.fi/tmux-cheat-sheet?s={query}.
Name it something like: Search tmux cheat sheet for {query}
Give it a suitable keyword like "tmux", and save.
Then type something like "tmux kill" into Alfred, et voilà.
How to add tmux cheat sheet as custom search engine in Alfred