tmux#Start a new sessiontmuxnew-smyname#Start a new session with a nametmuxaortmuxattach#Attach to the last sessiontmuxa-tmyname#Attach to a named sessiontmuxls#List all sessionstmuxkill-session-tmyname#Kill a sessiontmuxkill-server.#Kill all Session
General Shortcuts:
Prefix
<prefix> - ctrl + b #ctrl+b will be considered as prefix by default
Sessions:
<prefix> :new<CR>#Create a new session<prefix> s #List sessions<prefix> $ #Rename session
Windows (Tabs):
<prefix> c #Create window<prefix> w #List windows<prefix> n #Next window<prefix> p #Previous window<prefix> f #Find window<prefix> , #Name window<prefix>&#Kill window
Panes (Splits):
<prefix>%#Vertical split<prefix>" #Horizontal split<prefix> o #Swap panes<prefix> q #Show pane numbers<prefix> x #Kill pane<prefix>+#Break pane into window<prefix>-#Restore pane from window<prefix><Space>#Toggle between layouts<prefix> q #(Show pane numbers, then type the key to go to that pane)<prefix>{#Move the current pane left<prefix>}#Move the current pane right<prefix> z #Toggle pane zoom
Sync Panes:
Set synchronize-panes:
<prefix>:setw synchronize-panes
Set synchronize-panes off:
<prefix>:setw synchronize-panes off
Resizing Panes:
<prefix>:resize-pane -D/U/L/R [N]
Copy Mode:
Enter Copy mode:
<prefix> [
Vi mode (add to .tmux.conf):
setw -g mode-keys vi
Movement in Copy mode:
h, j, k, l, w, b, f, F, etc.
Exit Copy mode:
<Enter>
Miscellaneous:
<prefix> d #Detach<prefix> t #Show big clock<prefix> ? #List shortcuts<prefix>:#Open prompt
Configurations Options (Add to .tmux.conf):
Mouse support:
set-g mouse on
Set default terminal mode:
set-g default-terminal "screen-256color"
Activity alerts:
setw -g monitor-activity onset-g visual-activity on