Updated: 14 February 2024
Change default prefix key binding to Ctrl + a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
Freelance software engineer United Kingdom
Updated: 14 February 2024
Change default prefix key binding to Ctrl + a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
Updated: 18 May 2023
Enter copy mode with Ctrl+b [
then /
or ?
to search forwards or backwards.
n
or N
to move to next or previous result.
Updated: 07 May 2023
Enter copy mode
Ctrl+b [
Then, navigate with vim key bindings, space bar to start selection, enter to copy.
Paste back into tmux or vim running inside tmux
Ctrl+b ]
From tmux, transfer text to ‘middle mouse button’ clipboard
echo -n "text for system clipboard" | xclip
From tmux, transfer text to ‘clipboard’ clipboard
echo -n "text for system clipboard" | xclip -sel clip
tmux show-buffer | xclip -selection clipboard
Updated: 06 December 2024
Image credit: https://arcolinux.com/everthing-you-need-to-know-about-tmux-panes/
Show pane numbers
Ctrl+b q
select-layout even-vertical
Ctrl+b Alt+2
select-layout even-horizontal
Ctrl+b Alt+1
New session
tmux
Rename current session
Ctrl+b $
Rename current window
Ctrl+b ,
Show clock
Ctrl+b t
Create new session when already in a session
Ctrl+b :new
Move a window e.g. window 4 goes to 2
swap-window -s 4 -t 2
Kill everything
tmux kill-server
Kill window
Ctrl+b &
Kill a frozen pane
Ctrl+b x
Kill highlighted session whilst in choose tree
x
Detach the current client
Ctrl+b d
Show the choose tree
Ctrl+b s