Chuyển tới nội dung chính
kitlocal.dev

Bảng tra cứu nhanh tmux

Chạy cục bộ

Xử lý 100% ngay trong trình duyệt. Dữ liệu đầu vào và kết quả không rời khỏi thiết bị.

Lệnh chia màn hình terminal tmux giải thích dễ hiểu: phiên làm việc, cửa sổ, chia khung, copy mode và điều khiển trên tmux 3.6.

Cách hoạt động

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.

Bộ lệnh sống còn

Vài lệnh nên học trước tiên.

40 lệnh

Phím tắt/Tìm kiếmJKDi chuyển mục chọnCSao chép lệnh đang chọnFĐánh dấu mục đang chọnEscXoá tìm kiếm

Manage sessions (shell)

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

Tài liệu chính thức: tmux sessions
  • Cơ bản

    Create and attach to a named tmux session.

    tmux new -s <name>

    Dựng lệnh

    tmux new -s <name>

    Giá trị được chèn đúng như bạn nhập. Hãy tự đặt dấu nháy nếu giá trị có khoảng trắng hoặc ký tự đặc biệt.

    Khi nào dùng

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

    Giải thích từng phần

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

    Ví dụ

    Starts a session named api.

    tmux new -s api

    Cách khác

    • tmux new-session -s <name>

    Xem thêm

Windows (tabs)

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

Tài liệu chính thức: Windows and panes

Split & navigate panes

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

Tài liệu chính thức: 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.

Tài liệu chính thức: Copy mode

Commands & configuration

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

Tài liệu chính thức: Configuration & options

Dùng thử trong công cụ KitLocal

Thuật ngữ
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.

Kiểm tra ngày 15 thg 11, 2026 · Đối chiếu với tmux 3.6

Nguồn: tmux manual page (man7.org) · tmux GitHub wiki

Hãy thay phần trong dấu ngoặc nhọn bằng giá trị của bạn. Lệnh lấy từ tài liệu chính thức, ví dụ đã được chạy thử trên phiên bản được ghi.