Skip to content

Tmux Basics

Daily Usage

  • Ctrl+b, %: Split the current window into two vertical panes
  • Ctrl+b, ": Split the current window into two horizontal panes
  • Ctrl+b, ?: Show all tmux shortcuts
  • Ctrl+b, [: Enter copy/Scroll mode
  • Ctrl+b, ]: Paste the copied text

Starting and Quitting Tmux

  • tmux: Start a new tmux session
  • tmux a: Attach to an existing tmux session
  • tmux ls: List all existing tmux sessions
  • tmux kill-session: Kill a tmux session
  • Ctrl+b, q: Quit tmux
  • Ctrl+b, c: Create a new window
  • Ctrl+b, n: Move to the next window
  • Ctrl+b, p: Move to the previous window
  • Ctrl+b, w: List all windows
  • Ctrl+b, &: Kill the current window

Panes

  • Ctrl+b, %: Split the current window into two vertical panes
  • Ctrl+b, ": Split the current window into two horizontal panes
  • Ctrl+b, o: Move to the next pane
  • Ctrl+b, ;: Move to the previous pane
  • Ctrl+b, x: Kill the current pane
  • Ctrl+b, q: Show pane numbers

Copy and Paste

  • Ctrl+b, [: Enter copy mode
  • Ctrl+b, ]: Paste the copied text
  • Ctrl+b, =: Open the buffer list

Session Management

  • Ctrl+b, s: List all sessions
  • Ctrl+b, $: Rename the current session
  • Ctrl+b, d: Detach from the current session
  • Ctrl+b, t: Show the time

Window Management

  • Ctrl+b, ,: Rename the current window
  • Ctrl+b, .: Move the current window to the next position
  • Ctrl+b, !: Move the current window to the first position
  • Ctrl+b, Ctrl+Up/Down: Resize the current window

Miscellaneous

  • Ctrl+b, ?: Show the help menu
  • Ctrl+b, r: Reload the tmux configuration file
  • Ctrl+b, Ctrl+r: Reset the tmux environment
  • Ctrl+b, Ctrl+s: Suspend the tmux session
The content provided is generated with the help of artificial intelligence (AI) and may contain inaccuracies or outdated information due to the limitations of AI. While I strive to review and validate the content, some errors or inaccuracies may still be present in the final output. Please use this content as a general guide only and verify any critical information through reputable sources before relying on it. I appreciate your understanding and feedback in helping us improve the accuracy and quality of our AI-generated content."