Skip to main content

tmux

Sessions

Start session

  • tmux new
  • tmux new -s mysession

Show sessions

  • tmux ls

Kill sessions

  • tmux kill-session  -t mysession
  • tmux kill-session -a  ;kill all sessions but last session

Attach sessions

  • tmux a
  • tmux a -t #
  • tmux a -t mysession
Keyboard

OtherPREFIX: CTRL+b

sessions

  • Detach from session: [Ctrl - b]PREFIX + d
  • Rename session: [Ctrl - b]PREFIX + $
  • Move to previous session: [Ctrl - b]PREFIX + (
  • Move to next session: [Ctrl - b]PREFIX + )

Windows

    Create a new window: PREFIX + c Rename the window: PREFIX + , Move the window: PREFIX + {window-number} Close current window: PREFIX + &

    Copy Mode

    • Enter copy mode: [Ctrl - b]PREFIX + [
    • Exit copy mode: q
    FAQ

    Window 無法固定標題名稱

    Solution: ~/.tmux.conf

    set-option -g allow-rename off


    Learn