Tmux

Tmux Cheatsheet

Session Management

  • Create a new session: tmux new-session -s session_name
  • Attach to an existing session: tmux attach-session -t session_name
  • Detach from the current session: Ctrl-b d
  • List all sessions: tmux list-sessions
  • Switch between sessions: Ctrl-b ( (previous session) and Ctrl-b ) (next session)

Window Management

  • Create a new window: Ctrl-b c
  • Switch to the next window: Ctrl-b n
  • Switch to the previous window: Ctrl-b p
  • Switch to a specific window: Ctrl-b <window_number>
  • Close the current window: Ctrl-b &

Pane Management

  • Split the current pane horizontally: Ctrl-b %
  • Split the current pane vertically: Ctrl-b "
  • Switch to the next pane: Ctrl-b o
  • Switch to a specific pane: Ctrl-b <arrow_key>
  • Close the current pane: Ctrl-b x

Other Commands

  • Show all key bindings: Ctrl-b ?
  • Rename the current session: Ctrl-b $
  • Reload the tmux configuration: Ctrl-b : source-file ~/.tmux.conf

For more information, refer to the Tmux manual.