Tmux Cheatsheet

Tmux stands for terminal multiplexer. It makes working with multiple terminal sessions easier.
Tags : tmux terminal term

Sessions manage tmux sessions
# Session management
$ tmux detach
$ tmux det

$ tmux attach
$ tmux attach -t <session_name>
$ tmux at

$ tmux list-sessions
$ tmux kill-session -t <session_name>

# Rename session
$ C-a + $
Commands
# Command prompt
C-a + :

# Resize Pane (from the command prompt)
# resize-pane, args {U, D, L, R} (Up, down, Left, Right)
> resize-pane -R
> resize-pane -R 5
Windows manage windows
# Prefix rebind C-a

# New window
C-a + c
# Close window
C-a + &
# Rename window
C-a + ,

# Switching
# Next
C-a + n
# Previous
C-a + p
# Pane num
C-a + 1 (2, 3, etc...)

# "Tree" view of windows
C-a + w
Panes manage panes
# split
C-a + "

# vertical split
C-a + %