tmux new-session -s seesion_1 tmux new -s seesion_1
don't attach to current window
tmux new -s seesion_1 -d
tmux kill-session -t seesion_1
Ctrl+b
press Ctrl+b, then t a large clock appear on the screen
detach from a seesion
create a window in a current session
rename a window
go to the previous window
go to the next window
go to the target number window
display a visual menu of your windows
find a window that contains a string of text
close a window or use exit
virtically split
horizontally split
cycle through the panes
move around the panes
- even-horizontal
- even-vertical
- main-horizontal
- main-vertical
- tiled
kill a pane, which also closes the window if there's only one window
enter command mode
get a list of all predefined keybindings and associated commmands these trigger
# Setting the prefix from C-b to C-q
set -g prefix C-q
# free the original C-b key
unbind C-b
# reload the configuration file
bind r source ~/.tmux.conf \; display "Reloaded!"
# ensure that we can send Ctrl-Q to other apps
bind C-q send-prefix
# splitting panes with | and -
bind | split-window -h
bind - split-window -v
# moving between panes with prefix h,j,k,l
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# quick window selection
bind -r C-h select-window -t :-
bind -r C-l select-window -t :+
# rezise pane size, allow repeat
bind -r H resize-pane -L 5
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r L resize-pane -R 5
# mouse
# set -g mouse on
set -g mouse on
# set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"
# set color for the active window
setw -g window-status-current-style bg=red
# set escape time zero
set -s escape-time 0
# scroll screen
setw -g mode-keys vi
# Ctrl-q, [
# up: Ctrl-u
# down: Ctrl-d