Skip to content

Instantly share code, notes, and snippets.

@bloc40
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save bloc40/2a217ad31720c3f36071 to your computer and use it in GitHub Desktop.

Select an option

Save bloc40/2a217ad31720c3f36071 to your computer and use it in GitHub Desktop.
Tmux Commands
prefix = Ctrl-a

Sessions:

tmux -V                        # show version
tmux                           # start a session
tmux new -s <name>             # start a session named <name>
tmux ls                        # list tmux sessions
tmux a                         # attach to a session (if there is only one running)
tmux attach -t <session>       # attach to this session
tmux kill-session -t <session> # kill this session
tmux list-keys                 # list out every bound key and the tmux command it runs
tmux list-commands             # list out every tmux command and its arguments
tmux info                      # list out every session, window, pane, its pid, etc.
tmux source-file $HOME/.tmux.conf  # reload the current tmux configuration

prefix d                       # detach from a session
prefix n                       # move between sessions
prefix s                       # list all sessions
prefix $                       # rename session

exit                           # close a session

Windows:

tmux new -s windows -n shell  # create a session called windows and a window called shell
prefix c                      # create a new window
prefix ,                      # rename a window
prefix h/j/k/l                # move between windows
prefix 0..9                   # select window by number
prefix w                      # list all windows
prefix &                      # kill window with confirmation

Panes:

prefix |                  # create a vertical pane
prefix -                  # create a horizontal pane
prefix o                  # cycle between panes
prefix Up/Down/Left/Right # cycle between panes
prefix :                  # Enter a command
prefix q                  # display the number of panes momentarily
prefix + [                # Enter copy mode
prefix ]                  # paste current buffer content (in command mode: capture-pane will copy the entire visible pane)
prefix =                  # list all paste buffers and pastes selected buffer contents
prefix z                  # zoom in/out
prefix t                  # show the time
prefix !                  # turn a pane into a window
prefix x                  # kill a pane with confirmation
prefix {/}                # swap panes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment