TMUX Cheat Sheet

Years ago I started taking advantage of tmux – the terminal multiplexer. Like screen, it’ll let you run multiple terminals, and your program will stay running when you leave it or lose SSH connections.

Session Management

New session

[code]tmux new[/code]

New session with name
[code]tmux new -s sessionname[/code]

List sessions
[code]tmux ls[/code]

Attach to session by name
[code]tmux attach -t sessionname[/code]

Attach to last session
[code]tmux attach[/code]

Kill a session
[code]tmux kill-session -t sessionname[/code]

Switch to next session
[code]Ctrl+b )[/code]

Switch to last session
[code]Ctrl+b ([/code]

Detach from session
[code]Ctrl+b d[/code]

Rename session
[code]Ctrl+b $[/code]

Vertical Split Screen

Create vertical split
[code]Ctrl+b %[/code]

Go to next pane
[code]Ctrl+b o[/code]

Go to previous pane
[code]Ctrl+b ;[/code]

Move active pane to the right
[code]Ctrl+b }[/code]

Move active pane to the left
[code]Ctrl+b {[/code]

Move edge of pane right (resize)
[code]Ctrl+b right arrow[/code]

Move edge of pane left (resize)
[code]Ctrl+b left arrow[/code]

Convert pane to window
[code]Ctrl+b ![/code]

Kill pane
[code]Ctrl+b x[/code]

Horizontal Split Screen

Create horizontal split
[code]Ctrl+b “[/code]

Go to next pane
[code]Ctrl+b o[/code]

Go to previous pane
[code]Ctrl+b ;[/code]

Move active pane down
[code]Ctrl+b }[/code]

Move active pane up
[code]Ctrl+b {[/code]

Move edge of pane up (resize)
[code]Ctrl+b+up arrow[/code]

Move edge of pane down (resize)
[code]Ctrl+b+left arrow[/code]

Convert pane to window
[code]Ctrl+b ![/code]

Kill pane
[code]Ctrl+b x[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *