Command cheatsheet

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).

Copy pane content

# 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

~/.tmux.conf example

## 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


Last-Updated: 2023-05-22
Content from gemini://

More info about Gemini protocol