メインコンテンツへスキップ
kitlocal.dev

tmuxチートシート

ローカルで実行

100% ブラウザ内で処理されます。入力や出力が端末の外に送信されることはありません。

tmux ターミナルマルチプレクサのコマンドを平易な言葉で解説:セッション、ウィンドウ、ペイン分割、同期入力、コピーモード、および tmux 3.6 でのスクリプト制御。

動作の仕組み

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.

サバイバルキット

最初に覚えるべき最小限のコマンド。

40 件のコマンド

キーボードショートカット/検索にフォーカスJK選択を移動C選択項目をコピーF選択項目をブックマークEsc検索をクリア

Manage sessions (shell)

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

公式ドキュメント: tmux sessions
  • 基本

    Create and attach to a named tmux session.

    tmux new -s <name>

    コマンドを組み立てる

    tmux new -s <name>

    値は入力した通りにそのまま挿入されます。空白や特殊文字を含む場合は、必要に応じて引用符で囲んでください。

    使いどころ

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

    コマンドの内訳

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

    実例

    Starts a session named api.

    tmux new -s api

    他の方法

    • tmux new-session -s <name>

    関連項目

Windows (tabs)

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

公式ドキュメント: Windows and panes

Split & navigate panes

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

公式ドキュメント: 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.

公式ドキュメント: Copy mode

Commands & configuration

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

公式ドキュメント: Configuration & options

KitLocalツールで試す

用語集
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.

2026/11/15 に検証済み · tmux 3.6 で検証済み

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

山括弧内の内容は実際の値に置き換えてください。コマンドは公式ドキュメントに基づいており、実例は記載されたバージョンで実行確認されています。