Skip to content

Instantly share code, notes, and snippets.

@AshRhazaly
Last active June 10, 2017 12:00
Show Gist options
  • Select an option

  • Save AshRhazaly/f5638e615e0d85e6fcf5cfb098b40bf3 to your computer and use it in GitHub Desktop.

Select an option

Save AshRhazaly/f5638e615e0d85e6fcf5cfb098b40bf3 to your computer and use it in GitHub Desktop.
TMUX notes

session management

  1. tmux ls (or tmux list-sessions)
  2. tmux new -s session-name
  3. Ctrl-b d Detach from session
  4. tmux attach -t [session name]
  5. tmux kill-session -t session-name

Window Management

  1. Ctrl-b c Create new window
  2. Ctrl-b d Detach current client
  3. Ctrl-b l Move to previously selected window
  4. Ctrl-b n Move to the next window
  5. Ctrl-b p Move to the previous window
  6. Ctrl-b & Kill the current window
  7. Ctrl-b , Rename the current window
  8. Ctrl-b q Show pane numbers (used to switch between panes)
  9. Ctrl-b o Switch to the next pane
  10. Ctrl-b ? List all keybindings

moving between windows

  1. Ctrl-b n (Move to the next window)
  2. Ctrl-b p (Move to the previous window)
  3. Ctrl-b l (Move to the previously selected window)
  4. Ctrl-b w (List all windows / window numbers)
  5. Ctrl-b window number (Move to the specified window number, the default bindings are from 0 -- 9)

Tiling commands

  1. Ctrl-b % (Split the window vertically)
  2. CTRL-b " (Split window horizontally)
  3. Ctrl-b o (Goto next pane)
  4. Ctrl-b q (Show pane numbers, when the numbers show up type the key to go to that pane)
  5. Ctrl-b { (Move the current pane left)
  6. Ctrl-b } (Move the current pane right)

Make a pane its own window

  1. Ctrl-b : "break-pane"

add to ~/.tmux.conf

  1. bind | split-window -h
  2. bind - split-window -v
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment