Skip to content

Instantly share code, notes, and snippets.

@BobCHub
Created February 17, 2018 17:37
Show Gist options
  • Save BobCHub/c1d25fc76b82d1353f7461f50d27ecc2 to your computer and use it in GitHub Desktop.
Save BobCHub/c1d25fc76b82d1353f7461f50d27ecc2 to your computer and use it in GitHub Desktop.
TMUX Reference
#Running tmux
tmux can be run from within an terminal window by typing tmux
#Commands
tmux commands are introduced by hitting <CTRL>+b followed by the command.
# Sessions
tmux // to start a session
exit // to end the session
tmux new-session -s sesh_name // to start a new named session
tmux new -s sesh_name // shorthand for above
tmux new -s another_sesh -d // create a session in the background
tmux new -s sesh_name -n shell // name the first window shell
tmux list-sessions // list running sessions
tmux ls
C-b d // "detach" from running session
tmux attach // works if there is only one session running
tmux attach -t session_name // if there are multiple sessions
tmux kill-session -t session_name
# Windows
<CTRL>+b c // creates a new tmux window
<CTRL>+b , // rename a window
<CTRL>+b p // previous window
<CTRL>+b n // next window
<CTRL>+b w // list window / select
# Panes
<CTRL>+b % // split window (create pane) vertically
<CTRL>+b : // split-window split window (create pane) horizontally
<CTRL>+b o // next pane
<CTRL>+b x // exit pane
<CTRL>+b q<number> // access pane by number, e.g. <CTRL>+b q1
<CTRL>+b [ enable scrolling history in current pane (use mouse or pgUp / pgDown)
q // leave scroll view in pane
<CTRL>+b : resize-pane -D // Resize the current pane down
<CTRL>+b : resize-pane -U // Resize the current pane up
<CTRL>+b : resize-pane -L // Resize the current pane left
<CTRL>+b : resize-pane -R // Resize the current pane right
<CTRL>+b : resize-pane -D // 10 Resize the current pane down by 10 cells
<CTRL>+b : resize-pane -U // 10 Resize the current pane up by 10 cells
<CTRL>+b : resize-pane -L // 10 Resize the current pane left by 10 cells
<CTRL>+b : resize-pane -R 10 // Resize the current pane right by 10 cells
@BobCHub
Copy link
Author

BobCHub commented Feb 17, 2018

TMUX Reference

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