Tmux Cheat Sheet
Total Page:16
File Type:pdf, Size:1020Kb
tmux cheat sheet Close current window Sessions Ctrl + b & Start a new session Previous window tmux Ctrl + b p tmux new tmux new-session Next window :new Ctrl + b n Start a new session with the name mysession Switch/select window by number tmux new -s mysession Ctrl + b 0 ... 9 :new -s mysession Reorder window, swap window number 2(src) and kill/delete session mysession 1(dst) tmux kill-session -t mysession swap-window -s 2 -t 1 kill/delete all sessions but the current Move current window to the left by one position tmux kill-session -a swap-window -t -1 kill/delete all sessions but mysession tmux kill-session -a -t mysession Rename session Panes Ctrl + b $ Toggle last active pane Detach from session Ctrl + b ; Ctrl + b d Split pane vertically Show all sessions Ctrl + b % tmux ls Ctrl + b s Split pane horizontally Attach to last session Ctrl + b " tmux a tmux at Move the current pane left tmux attach Ctrl + b { tmux attach-session Move the current pane right Attach to a session with the name mysession Ctrl + b } tmux a -t mysession tmux attach-session -t mysession Switch to pane to the direction Ctrl + b ↑ (↓ , →, ←) Move to previous session Ctrl + b ( Toggle synchronize-panes (send command to all panes) Move to next session setw synchronize-panes Ctrl + b ) Toggle between pane layouts Ctrl + b Spacebar Switch to next pane Windows Ctrl + b o start a new session with the name mysession and Show pane numbers window mywindow Ctrl + b q tmux new -s mysession -n mywindow Switch/select pane by number Create window Ctrl + b q 0 ... 9 Ctrl + b c Toggle pane zoom Rename current window Ctrl + b z Ctrl + b , Convert pane into a window Ctrl + b ! http://www.comtronic.com.au tmux cheat sheet Resize current pane height (hold three keys) Previous keyword occurrence Ctrl + b + ↑ (↓) N Resize current pane width (hold three keys) Start selection Ctrl + b + → ( ←) Spacebar Close current pane Clear selection Ctrl + b x Esc Copy selection Enter Copy Mode Paste contents of buffer_0 Ctrl + b ] use vi keys in buffer setw -g mode-keys vi display buffer_0 contents show-buffer Enter copy mode Ctrl + b [ copy entire visible contents of pane to a buffer capture-pane Enter copy mode and scroll one page up Ctrl + b PgUp Show all buffers list-buffers Quit mode q Show all buffers and paste selected choose-buffer Go to top line g Save buffer contents to buf.txt save-buffer buf.txt Go to bottom line G delete buffer_1 delete-buffer -b 1 Scroll up ↑ Scroll down Misc ↓ Move cursor left Enter command mode h Ctrl + b : Move cursor down Set OPTION for all sessions j set -g OPTION Move cursor up Set OPTION for all windows k setw -g OPTION Move cursor right Show every session, window, pane, etc... l tmux info Move cursor forward one word at a time Show shortcuts w Ctrl + b ? Move cursor backward one word at a time b Search forward / Search backward ? Next keyword occurrence n http://www.comtronic.com.au .