Summary

Tmux is a terminal multiplexer an alternative to GNU Screen . In other words, it means that you can start a Tmux session and then open multiple windows inside that session. Each window occupies the entire screen and can be split into rectangular panes. difference between pane,window and session image

Cheat sheet

  1. prefix command default: ctrl+b custom: ctrl+w all the commands below are with prefix

  2. detach session: d

  3. attach: tmux attach -t(-d) name

  4. switch between sessions: ()

  5. list sessions: ls

  6. close pane: x

  7. new session: :new -s name

  8. copy mode: <prefix> [ then use vim mode command move around and copy(y) and paste(p)

  9. describe key binding: <prefix> /

  10. rename current session: $

  11. pane to new window

    break-pane or <prefix> !
    
  12. selecting/deleting session, windows, pane interactively <prefix> w x -> to delete selected session or window

tmux choose-tree
  1. killing session (assuming here that you’re on keepMe session)

-or-

  1. list all commands: tmux list-keys

copy paste workflow

ref Add setw -g mode-keys vi in your tmux config

  1. Ctrl + [ to enter tmux vi copy mode
  2. Move around with vim navigation keys
  3. Begin highlight with Space(v)
  4. Copy with Enter(y)
  5. Paste with Ctrl + ] (<prefix> P)(exit copy mode)
  6. z: toggle zoom