Tmux Cheat Sheet

Tmux Cheat Sheet

My .tmux.con:

unbind C-b
unbind '"'
unbind %
set-option -g prefix C-a
bind-key C-a send-prefix
bind h split-window -h
bind v split-window -v

set -g default-terminal "screen-256color"
set -g message-style fg=white,bold,bg=red
set -g status-style fg=white,bg=red
set -g pane-border-style fg=red
set -g pane-active-border-style "bg=red fg=green"
set -g mouse on

Tmux is a wonderful multiplexer and a very useful tool for penetration testers and red teamers. I use it a lot. Here I have noted the most used tmux command for future reference!


Here is some session management command

Start a new session with a name

tmux new -s session_name

List Sessions

tmux ls

Attach to a session

#attach to last session
tmux a

#Attach to an specific session
tmux a -t session_name

kill a session

tmux kill-session -t session_name

Kill all sessions

tmux kill-session -a 

Detach from session

Ctrl+a d

:attach -d

Move to the next session

Ctrl+a )

Move to the Previous Session

Ctrl+a (


Here is some windows management command

Create Window

Ctrl+a c

Rename Window

Ctrl+a ,

Move to the next window

Ctrl+a n

Move to the window by the number

Ctrol+a 0...9


Here is some panes management command

Split Pane Horizontally/Vertically

Ctrl+a h
Ctrl+a v

Switching Panes

Ctrl+a left/right/up/down

Resize the Height/Width of the current pane

Ctrl+a up
Ctrl+a down
Ctrl+a left
Ctrl+a right


Here is some Misc command

Enter Command Mode

Ctrl+a :