tmuxtmux list-sessions
tmux lsCtrl + b d
tmux attach -t [session-id]
tmux a -t [session-id]- a pane is a terminal section within a window
Ctrl + b "
Ctrl + b %
Ctrl + b arrow key
:resize-pane -L 20 # Resizes the current pane Left by 20 cells
:resize-pane -R 20 # Resizes the current pane Right by 20 cells
:resize-pane -D 20 # Resizes the current pane Down by 20 cells
:resize-pane -U 20 # Resizes the current pane Upward by 20 cells
or
:set mouse on # do resize with a mouse
:set mouse off- a session can have multiple windows
- a window can have mutiple panes
# within Tmux, type:
tmux new-windowor
Ctrl + b c
Ctrl + b p
Ctrl + b n
Ctrl + b &
Ctrl + b ,
tmux rename-session [new-name]or
Ctrl + b $
Ctrl + b s
# Prefix + r to load conf file
bind r source ~/.tmux.conf \; display "~/.tmux.conf loaded!"
# Prefix + k to toggle mouse mode on/off
bind-key k set-option -g mouse \; display-message 'Mouse #{?mouse,on,off}'
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# Prefix + h / v to set window split
bind-key h split-window -h
bind-key v split-window -v
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
# Status Bar
set -g status-bg black
set -g status-fg colour35