The gMan nixWiki

Because the mind is made of Teflon...

User Tools

Site Tools


cheat_sheets_tmux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cheat_sheets_tmux [2022/09/25 15:47] – [Sessions] gmancheat_sheets_tmux [2024/01/20 16:28] (current) gman
Line 1: Line 1:
 ====== tmux ====== ====== tmux ======
  
-{{::tmux.png?linkonly| Cheet Sheet}} +**Cheet Sheets:**  
 +{{::tmux.png?linkonly | color}}, {{:tmux-printer.png?linkonly | black & white}}, {{ ::tmux-printer.pdf | printable}}
  
 ===== Sessions ===== ===== Sessions =====
Line 16: Line 16:
  
 # Sessions Management # Sessions Management
-tmux ls +tmux ls  # lists current running sessions
 tmux rename-session -t [number] [new name] tmux rename-session -t [number] [new name]
  
Line 41: Line 41:
  
 Windows are like tabs in a browser. Windows exist in sessions and occupy the whole screen. Windows are like tabs in a browser. Windows exist in sessions and occupy the whole screen.
 +
 +**Key Bindings:**
  
 ^ Command          ^ Description              ^ ^ Command          ^ Description              ^
Line 60: Line 62:
 Panes are sections of windows that have been split vertically or horizontally (like... uh... panes in a glass window...) Panes are sections of windows that have been split vertically or horizontally (like... uh... panes in a glass window...)
  
-^ Command          ^ Description              +**Key Bindings:** 
-| ''Ctrl-b %'' | split vertical | + 
-| ''Ctrl-b "'' | split horizontal | +^ Command                  ^ Description                    
-| ''Ctrl-b [right arrow]'' | move to pane to the right | +| ''Ctrl-b %''             | split vertical                 
-| ''Ctrl-b [left arrow]'' | move to pane to the left | +| ''Ctrl-b "''             | split horizontal               
-| ''Ctrl-b [up arrow]'' | move to pane above | +| ''Ctrl-b [right arrow]'' | move to pane to the right      
-| ''Ctrl-b [down arrow]'' | move to pane below | +| ''Ctrl-b [left arrow]''  | move to pane to the left       
-| ''Ctrl-b o'' | go to next pane | +| ''Ctrl-b [up arrow]''    | move to pane above             
-| ''Ctrl-b ;'' | got to last active pane | +| ''Ctrl-b [down arrow]''  | move to pane below             
-| ''Ctrl-b }'' | rotate panes clockwise | +| ''Ctrl-b o''             | go to next pane                
-| ''Ctrl-b {'' | rotate panes counter-clockwise | +| ''Ctrl-b ;''             | got to last active pane        
-| ''Ctrl-b !'' | convert pane to window | +| ''Ctrl-b }''             | rotate panes clockwise         
-| ''Ctrl-b x'' | kill pane |+| ''Ctrl-b {''             | rotate panes counter-clockwise | 
 +| ''Ctrl-b !''             | convert pane to window         
 +| ''Ctrl-b x''             | kill pane                      |
  
  
Line 79: Line 83:
 ===== Copy ===== ===== Copy =====
  
 +**__Resource__:** [[https://www.rushiagr.com/blog/2016/06/16/everything-you-need-to-know-about-tmux-copy-pasting-ubuntu/ | Everything you need to know about tmux copy]]
 +
 +**To copy outside tmux:** You should be able to highlight with your mouse (shift + left-mouse-button). Once highlighted, go to the program where you want to paste and click the middle-mouse-button.
 +  * If that doesn't work (sometimes it does... sometimes it doesn't... and that drives me nuts!)...
 +  * **Shift + Left-Mouse-Button:** This highlights the text you want to copy. Then just go to the window/program into which you want to paste and middle-mouse-button to paste (i.e., Linux default behavior).
 +
 +**To copy inside tmux:** See the following...
 +
 +**Key Bindings:**
 +
 +^ Command      ^ Description       ^
 +| ''Ctrl-b ['' | enter copy mode   |
 +| ''Ctrl-b ]'' | paste from buffer |
 +
 +**Copy Mode Commands:**
 +
 +^ Command                  ^ Description        ^
 +| ''Ctrl-[spacebar]''      | start selection    |
 +| ''Ctrl-w'' or ''Alt-w''  | copy selection     |
 +| ''Ctrl-[Esc]''           | clear selection    |
 +| ''Ctrl-g''               | go to top          |
 +| ''Ctrl-G''               | go to bottom       |
 +| ''Ctrl-h''               | move cursor left   |
 +| ''Ctrl-j''               | move cursor down   |
 +| ''Ctrl-k''               | move cursor up     |
 +| ''Ctrl-l''               | move cursor right  |
 +| ''Ctrl-%%/%%''           | search             |
 +| ''Ctrl-#''               | list paste buffers |
 +| ''Ctrl-q''               | quit               |
  
 ---- ----
cheat_sheets_tmux.1664120846.txt.gz · Last modified: by gman