If you ever get a weird error about netsted sessions, just unset the env var TMUX with
tmux new-session -s <session name>
--OR--
tmux new -s <session name>
tmux List existing session
tmux Attatch Existing session
tmux attatch-session -t <session-id/session-name>
tmux Kill Existing session
tmux kill-session -t <session-id/session-name>
Delete all sessions except current
Press Ctrl+R
and type what you are searching for, then hit enter when the command appears
Ctrl+b [0-9]
--OR--
Ctrl+b right/left arrow keys
Move current pane left/right
Ctrl+b { #move left
Ctrl+b } #move right
#resize height
Ctrl+b uparrow
Ctrl+b downarrow
#resize width
Ctrl+b leftarrow
Ctrl+b rightarrow
SSH into remote host
Can run tmux ls
and view the tmux sessions
Example:
MINER: 1 windows (created Mon Novv 27 21:33:24 2022) [186x47]
To attatch to that session
Use prefix key + d to detatch from the connected session
Split Terminals Horizontal
set -g prefix C-a
bind C-a send-prefix
unbind C-b
#Quality of life stuff
set -g history-limit 10000
set -g allow-rename off
#Join Windows
bind-key j commpand-prompt -p "join pane from:" "join-pane -s '%%'"
bind-key -s command-prompt -p "send pane to:" "join-pane -t '%%'"
#search mode VI (default is emacs)
set-windows-option -g mode-keys vi
run-shell /opt/tmux-logging/logging.tmux