Intro

TMUX is a terminal multiplexer which lets you run multiple terminal sessions/instances in a single window.

The leader button: Ctrl + b is used to trigger many commands when inside a tmux session.

Basic Commands

  • tmux : Starts a new tmux session.
  • tmux attach: Reattaches to an existing session.
  • leader + n: to go to next pane.
  • leader + d : Detaches the current session.
  • leader + % : Splits the window horizontally.
  • leader + " : Splits the window vertically.
  • leader + <number>: Switches to a specific window (e.g., Ctrl + b 1 for window 1).
  • leader + c: Creates a new window.
  • leader + &: Kills the current window.
  • leader + x: Kills the current pane.
  • tmux ls: Lists all active sessions.
  • tmux kill-session -t <session_name>: Kills a specific session.
  • tmux kill-server: Kills all tmux sessions.
  • tmux rename-session -t <old_name> <new_name>: Renames a session.
  • tmux new-window -n <window_name>: Creates a new window with a specified name.

Cheat Sheet: https://tmuxcheatsheet.com/ Introductory video by typecraft on YouTube: https://www.youtube.com/watch?v=niuOc02Rvrc