tmux

Sessions

Start session

Show sessions

Kill sessions

Attach sessions

Save & Restore

Keyboard

PREFIX: CTRL+b

sessions

Windows

Panes

Copy Mode

Configuration

.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 #26
Created 2 June 2021 05:24:46 by Admin
Updated 18 October 2023 11:17:10 by Admin