๐พ Archived View for kelgors.me โบ wiki โบ tmux.gmi captured on 2024-05-10 at 10:55:50. Gemini links have been rewritten to link to archived content
โฌ ๏ธ Previous capture (2023-12-28)
-=-=-=-=-=-=-
2023-05-22
Ctrl+b (aka PREFIX) is used to enter in tmux command mode
Do it once then enter the second command (c key to create a new window).
โโโโโโโโโโโโโโโโโโโโโโโโโโโโคโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Command โ Description โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> c โ create a new window โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> n โ move to the next window. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> p โ move to the previous window. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> PgUp/PgDown โ Scroll mode (q to exit) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> $ โ Rename session โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> , โ Rename window โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> " โ split pane horizontally. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> % โ split pane vertically. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX> arrow key โ switch pane. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ Hold <PREFIX> arrow-keys โ resize pane. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโข
โ <PREFIX>+d โ exit pane โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโงโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
# to copy the content of the pane into a new buffer <PREFIX>:capture-pane -S- # to save the content of a buffer into a file <PREFIX>:save-buffer file.log
You can also do the same thing with tmux command, but you have to specify the window and pane name (or index)
tmux capture-pane -t <WINDOW>:<PANE> -pS- > file.log
## remap prefix from 'C-b' to 'C-a' # unbind C-b # set-option -g prefix C-a # bind-key C-a send-prefix ## split panes using | and - bind | split-window -h bind - split-window -v unbind '"' unbind % ## switch panes using Alt-arrow without prefix bind -n M-Left select-pane -L bind -n M-Right select-pane -R bind -n M-Up select-pane -U bind -n M-Down select-pane -D ## switch window using Ctrl-arrow without prefix bind -n M-PageUp previous-window bind -n M-PageDown next-window ## Mouse mode set -g mouse off set-option -g default-shell /usr/bin/zsh
Tags: tmux cheatsheet tips
Last-Updated: 2023-05-22