Tmux Commands

Tmux terminal multiplexer commands and key bindings.

Session Management

tmux

Start new session

tmux new -s session-name

Start named session

tmux ls

List all sessions

tmux attach -t session-name

Attach to named session

tmux attach

Attach to last session

tmux kill-session -t session-name

Kill named session

tmux kill-server

Kill all sessions

tmux rename-session -t old new

Rename session

Window Management

Ctrl+b c

Create new window

Ctrl+b ,

Rename current window

Ctrl+b &

Close current window

Ctrl+b n

Next window

Ctrl+b p

Previous window

Ctrl+b 0-9

Switch to window number

Ctrl+b w

List windows

Ctrl+b f

Find window by name

Ctrl+b .

Move window to different number

Pane Management

Ctrl+b %

Split pane vertically

Ctrl+b "

Split pane horizontally

Ctrl+b x

Kill current pane

Ctrl+b o

Switch to next pane

Ctrl+b q

Show pane numbers

Ctrl+b {

Move pane left

Ctrl+b }

Move pane right

Ctrl+b z

Toggle pane zoom

Ctrl+b Space

Toggle pane layouts

Ctrl+b !

Convert pane to window

Pane Navigation

Ctrl+b arrow-key

Move between panes

Ctrl+b q 0-9

Jump to pane by number

Ctrl+b Ctrl+arrow

Resize pane

Ctrl+b Alt+arrow

Resize pane by 5 cells

Ctrl+b ;

Toggle last active pane

Copy Mode

Ctrl+b [

Enter copy mode

Space

Start selection (in copy mode)

Enter

Copy selection and exit

Ctrl+b ]

Paste copied text

q

Exit copy mode

Ctrl+b =

List all paste buffers

Ctrl+b -

Delete most recent paste buffer

Session Control

Ctrl+b d

Detach from session

Ctrl+b D

Choose client to detach

Ctrl+b $

Rename current session

Ctrl+b s

List sessions

Ctrl+b (

Switch to previous session

Ctrl+b )

Switch to next session

Help & Info

Ctrl+b ?

List all key bindings

Ctrl+b t

Show current time

Ctrl+b i

Display pane information

tmux info

Show server information

Advanced Commands

Ctrl+b :

Enter command mode

tmux source-file ~/.tmux.conf

Reload configuration

Ctrl+b r

Reload config (if bound)

tmux set -g mouse on

Enable mouse support

tmux set -g status off

Hide status bar

tmux set -g prefix C-a

Change prefix to Ctrl+a

tmux set -g history-limit 10000

Set scrollback buffer size

Command Line

tmux send-keys -t session:window "cmd" Enter

Send command to window

tmux capture-pane -pt session:window

Capture pane contents

tmux show-options -g

Show global options

tmux list-keys

List all key bindings

tmux list-commands

List all tmux commands