# Tmux cheat sheet

A searchable tmux keyboard shortcut and command reference.

[Interactive example](/tmux-cheat-sheet)

## 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](https://irssi.org/) 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](https://clubmate.fi/tmux) for more
detailed info.

## Use with Alfred

![A screen shot of Alfred app’s search bar](/images/alfred-tmux-search.png)

You can quickly search this guide from [Alfred](https://www.alfredapp.com/) if
you setup a custom search.
[Click here to add it automatically](alfred://customsearch/Search%20tmux%20cheat%20sheet%20for%20%7Bquery%7D/tmux/utf8/nospace/https%3A%2F%2Fclubmate.fi%2Ftmux-cheat-sheet%3Fs%3D%7Bquery%7D).
Or see instructions below how to add it manually.

How to add custom Alfred search manually

1. Pop open Alfred settings.
2. Go to "Web Search".
3. Click "Add Custom Search".
4. In the "Search URL" field paste:
   `https://clubmate.fi/tmux-cheat-sheet?s={query}`.
5. Name it something like: `Search tmux cheat sheet for {query}`
6. Give it a suitable keyword like "tmux", and save.
7. Then type something like "tmux kill" into Alfred, et voilà.

![A screen shot of Alfred app](/images/alfred-tmux-search.png)

How to add tmux cheat sheet as custom search engine in Alfred
