githubEdit

tmux

  • If you ever get a weird error about netsted sessions, just unset the env var TMUX with

TMUX=

tmux Create New Session

tmux new-session -s <session name>
--OR--
tmux new -s <session name>

tmux List existing session

tmux list-sessions

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

tmux kill-session -a 
  • Press Ctrl+R and type what you are searching for, then hit enter when the command appears

Pre-Fix Key

  • By default it is Ctrl+B

Create a New Window

Switch between windows

  • or to go one previous

  • to go to next

Detach Session

Rename Window

Move current pane left/right

Exit pane

Resizing Panes

Convert pane to window

Nested tmux Sessions

  • SSH into remote host

  • Can run tmux ls and view the tmux sessions

  • Example:

  • To attatch to that session

  • Use prefix key + d to detatch from the connected session

Split Terminals Vertical

  • Ctrl+B %

Split Terminals Horizontal

  • Ctrl+B "

Custom tmux config

  • File located ~/.tmux

Last updated