Tmux Quick Reference
Sessions
Start a new session
tmuxtmux new
tmux new-session
:new
Start a new session with the name goyun
tmux new -s goyunnew -s goyun
kill/delete session goyun
tmux kill-ses -t goyuntmux kill-session -t goyun
kill/delete all sessions but the current
tmux kill-session -akill/delete all sessions but goyun
tmux kill-session -a -t goyunRename session
Ctrl + b $Detach from session
Ctrl + b d
Detach others on the session (Maximize window by detach other clients)
attach -dShow all sessions
tmux ls
tmux list-sessions
Ctrl + b s
Attach to last session
tmux atmux at
tmux attach
tmux attach-session
Attach to a session with the name goyun
tmux a -t goyuntmux at -t goyun
tmux attach -t goyun
tmux attach-session -t goyun
Move to previous session
Ctrl + b (Move to next session
Ctrl + b )Windows
start a new session with the name goyun and window nextruby
tmux new -s goyun -n nextrubyCreate window
Ctrl + b cRename current window
Ctrl + b ,Close current window
Ctrl + b &Previous window
Ctrl + b p
Next window
Ctrl + b nSwitch/select window by number
Ctrl + b 0 ... 9Reorder window, swap window number 2(src) and 1(dst)
:swap-window -s 2 -t 1Move current window to the left by one position
:swap-window -t -1Panes
Toggle last active pane
Ctrl + b ;
Split pane vertically
Ctrl + b %
Split pane horizontally
Ctrl + b "
Move the current pane left
Ctrl + b {Move the current pane right
Ctrl + b }Switch to pane to the direction
Ctrl + b + arrow keyToggle synchronize-panes(send command to all panes)
:setw synchronize-panesToggle between pane layouts
Ctrl + b SpacebarSwitch to next pane
Ctrl + b oShow pane numbers
Ctrl + b qSwitch/select pane by number
Ctrl + b q 0 ... 9Toggle pane zoom
Ctrl + b zConvert pane into a window
Ctrl + b !Resize current pane height
Ctrl + b +
Ctrl + b +
Resize current pane width
Ctrl + b +
Ctrl + b +
Close current pane
Ctrl + b x
Copy Mode
use vi keys in buffer
:setw -g mode-keys vi
Enter copy mode
Ctrl + b [
Enter copy mode and scroll one page up
Ctrl + b PgUp
Quit mode
qGo to top line
gGo to bottom line
GScroll up
Scroll down
Move cursor left
hMove cursor down
jMove cursor up
kMove cursor right
lMove cursor forward one word at a time
wMove cursor backward one word at a time
bSearch forward
/Search backward
?Next keyword occurance
nPrevious keyword occurance
NStart selection
SpacebarClear selection
EscCopy selection
EnterPaste contents of buffer_0
Ctrl + b ]
display buffer_0 contents
:show-buffercopy entire visible contents of pane to a buffer
Show all buffers
:list-buffersShow all buffers and paste selected
:choose-bufferSave buffer contents to goyun.txt
:save-buffer goyun.txtdelete buffer_1
delete-buffer -b 1Misc
Enter command mode
Ctrl + b :Set OPTION for all sessions
set -g OPTION
Comments
Post a Comment