tmux¶
I use o
as my prefix key. The default is b
.
set the prefix key to o
¶
unbind C-b
set-option -g prefix C-c
bind-key C-c send-prefix
resize a pane¶
Increase size down:
^o :resize-pane -D 10
This will also work to resize down:
^o ALT-DOWN
zoom in/out in a pane¶
^o z
misc¶
ctrl+b followed by...
% - split pane vertically
" - split pane horizontally
arrow keys - change pane you're typing in
:new-window
2 - switch to window 2
x - kill pane
d - detach
run a program in a new session¶
tmux new-session -d -s "top" /usr/bin/top
scrollback¶
Enter copy mode.
^b [
After the above, the Up/Down arrows or PageUp/PageDown can be used to navigate.
Exit copy mode.
q
name a session¶
tmux new-session -s "NAME"
start a detatched session¶
Start a new session, run a program, and detatch it.
tmux new-session -d -s "NAME" /path/to/program/to/run
rename a session¶
control + b $
^b $
rename a pane¶
control + b , (comma)
^b ,
copy the buffer¶
This puts the text into a buffer, but I’m not entirely sure what that means. -3000 is the number of lines you want to copy.
^o:capture-pane -S -3000
save buffer to a file¶
^o:save-buffer ~/filename.txt