Ir para o conteúdo principal
kitlocal.dev

Cheatsheet do tmux

Roda localmente

100% processado no seu navegador. Entradas e saídas nunca saem do seu dispositivo.

Comandos do multiplexador de terminal tmux em linguagem simples: sessões, janelas, painéis divididos, entrada sincronizada, modo de cópia e scripts no tmux 3.6.

Como funciona

tmux uses a three-level hierarchy: a persistent server holds sessions (projects), each session holds windows (tabs), and each window splits into panes. Detaching leaves the session running in the background so you can reconnect later; inside tmux, most key bindings start with the prefix Ctrl-b followed by one key.

Kit de sobrevivência

Os principais comandos para aprender primeiro.

40 comandos

Atalhos de teclado/Focar buscaJKMover seleçãoCCopiar selecionadoFFavoritar selecionadoEscLimpar busca

Manage sessions (shell)

Sessions survive SSH disconnects and terminal restarts. Name every project session so attaching is effortless.

Documentação oficial: tmux sessions
  • Essencial

    Create and attach to a named tmux session.

    tmux new -s <name>

    Montar o comando

    tmux new -s <name>

    Os valores são inseridos exatamente como digitados. Coloque entre aspas você mesmo se contiverem espaços ou caracteres especiais.

    Quando usar

    Names the session so you can return to the exact workspace after disconnecting or closing your terminal.

    Detalhamento

    new
    alias for new-session
    -s <name>
    session name

    Exemplo

    Starts a session named api.

    tmux new -s api

    Também funciona

    • tmux new-session -s <name>

    Veja também

Windows (tabs)

Windows act like full-screen tabs inside a session. Each appears in the bottom status bar.

Documentação oficial: Windows and panes

Split & navigate panes

Split one window into multiple panes to edit code beside logs or a test runner.

Documentação oficial: Pane commands

Scrollback & copy mode

tmux holds its own scrollback buffer per pane. Enter copy mode to scroll, search logs and copy without leaving the keyboard.

Documentação oficial: Copy mode

Commands & configuration

Customize prefix, mouse support and reload ~/.tmux.conf without restarting running sessions.

Documentação oficial: Configuration & options

Experimente em uma ferramenta do KitLocal

Glossário
Prefix
The shortcut pressed before a tmux command key. Default is Ctrl-b (release both keys before pressing the next key).
Session
A named workspace containing one or more windows that stays alive on the tmux server after you detach.
Window
A full-screen view inside a session (similar to a browser tab), numbered starting at 0 by default.
Pane
One rectangular terminal split inside a window, running its own shell.
Copy mode
A scrollback and selection mode entered with Ctrl-b [ so you can scroll up and copy text without a mouse.

Verificado em 15 de nov. de 2026 · Verificado na versão tmux 3.6

Fontes: tmux manual page (man7.org) · tmux GitHub wiki

Substitua qualquer item entre colchetes angulares pelos seus próprios valores. Os comandos vêm da documentação oficial e os exemplos foram executados na versão indicada.