Advertisement
alice_killer

tmux

Jul 11th, 2025 (edited)
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. to make a tmux session and name it `tmux new -s bob`
  2.  
  3. to detach tmux - `ctrl +b` + dd
  4.  
  5. to list tmux sessions - `tmux ls`
  6.  
  7. to attach to tmux's session - `tmux -a -t $number of session or name`
  8.  
  9. to kill tmux's session - `tmux kill-session -t bob
  10.  
  11. split screen horizontally - `ctrl +b` + %
  12. split screen vertically - `ctrl +b` + "
  13. to move between screens - `ctrl +b` + arrows or `ctrl +b` + q
  14. example `ctrl +b` + q + 2
  15. Hold down `Ctrl +b` and arrows to change the size of the screen
  16.  
  17. to make a new window - `ctrl + b` +c
  18. Jump within windows - `ctrl +b` + n
  19. Better way to jump within windows - `ctrl +b` + w (can kill a window via `ctrl +b` +x)
  20. rename window's name - `ctrl +b +,
  21. to kill all windows - `ctrl+b` +&
  22. to kill all sessions - `tmux kill-server
  23.  
  24. Ctrl+B Alt+1: Even horizontal splits
  25. Ctrl+B Alt+2: Even vertical splits
  26. Ctrl+B Alt+3: Horizontal span for the main pane, vertical splits for lesser panes
  27. Ctrl+B Alt+3: Vertical span for the main pane, horizontal splits for lesser panes
  28. Ctrl+B Alt+5: Tiled layout
  29.  
  30. Basic conf settings:
  31. vi ~/.tmux.conf
  32. set -g mouse on
  33. setw -g mode-keys vi
  34.  
  35. copy-paste:
  36. to copy - `ctrl+b` +[ (highlight with the mouse the text that you want to copy)
  37. ``` comment for the above command-- The following action is a full keyboard action and does not require a mouse.
  38. You can go to a certain line and press space, and move with the arrows right or left to highlight the text that you want to copy
  39. ```
  40. to paste - `ctrl+b +]
  41.  
  42. more info here:
  43. https://opensource.com/article/20/7/tmux-cheat-sheet
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement