Skip to content

Instantly share code, notes, and snippets.

@preetampvp
Last active January 28, 2017 10:10
Show Gist options
  • Save preetampvp/dd5972e3addd81241f5bc144082f16cf to your computer and use it in GitHub Desktop.
Save preetampvp/dd5972e3addd81241f5bc144082f16cf to your computer and use it in GitHub Desktop.
tmux cheatsheet

Shell

tmux new -s name - start a new session

tmux new -s name - start a new session in background

tmux new -s name -n window name "process to run" - start a new session with the window name set

tmux kill-session -t name - to kill a session

tmux attach -t name - connect to session

tmux ls - list sessions

Inside tmux

prefix D - detach from a session

prefix : - to enter command mode

prefix ? - keybindings and commands they trigger

Windows

prefix c - create a new window

prefix , - to rename a window

prefix n - cycle through windows

prefix p - cycle through windows - reverse

prefix number - to go to a window by number

prefix w - display a visual menu of windows open

prefix f - find a window that contains a string of text

** type exit or prefix &** - to close a window

Panes

prefix % - split window into vertical panes

prefix " - split window into horizontal panes

prefix o or prefix UP/DOWN/RIGHT/LEFT arrow keys - cycle through panes

prefix space - to cycle through tmux default pane layouts

exit or prefix x - to close a pane

Command mode

new-window -n name - create a window with name

new-window -n name "program to run - create a window with name and start the program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment