Digital Garden


Last updated 2023-01-04

Below prefix is mentioned multiple times. By default it is <C-b> which is ctrl + b.

It can be remapped to other key, i like to use ctrl + a:

set -g prefix C-a

Detach from specific session

You can choose which session to detach with prefix + D (uppercase D)

List all key bindings

tmux list-keys

or within tmux



`prefix` + `?`

Kill window

prefix + &

Kill pane

prefix + x

Change color of one pane

select-pane -t:.1 -P 'fg=red,bg=white'

Extract current pane into new window

prefix + !

Move pane to somewhere else

  1. go to pane you want to move
  2. mark it with prefix + m
  3. go to destination window/session
  4. :join-pane

Disable status bar

  1. Open command prompt with prefix+: (in my case prefix is ctrl+a, so full command is ctrl+a+:)
  2. set -g status off

split programatically

tmux split-window "echo hey"

This will work but close immediatelly after echo

To keep it open:

tmux set-option remain-on-exit on
tmux split-window "echo hey"