tmux

Sessions

Start session

Show sessions

Kill sessions

Attach sessions

Save & Restore

Keyboard

PREFIX: CTRL+b

sessions

Windows

Panes

Copy Mode

Configuration

~/.tmux.conf

Reload the configuration

tmux source ~/.tmux.conf

For Ubuntu/Debian

# Enable 256 color in terminal
set -g default-terminal "tmux-256color"

# Fix the dynamic title name
set-option -g allow-rename off

# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

# Window status
set-window-option -g window-status-current-style 'bg=#282a36 fg=#f8f8f2 bold'

For RHEL

# Fix the dynamic title name
set-option -g allow-rename off

vi-mode

# set vi-mode
set-window-option -g mode-keys vi
# keybindings
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
Plugin
FAQ

Window 無法固定標題名稱

Solution: ~/.tmux.conf

set-option -g allow-rename off


Learn




Revision #32
Created 2021-06-02 05:24:46 CST by A-Lang (Admin)
Updated 2025-09-17 16:01:00 CST by A-Lang (Admin)