Sunteți pe pagina 1din 2

tmux the terminal multiplexer Cheat Sheet

by bechtold via cheatography.com/7346/cs/1134/

General

customizing tmux

Control-a

customizing tmux (cont)

prefix key (default C-

set-option -g

rebind the Ctrl-

-g for

set -g visual-

show info on new

b)

prefix C-a

b prefix to Ctrl-

global

activity on

activity

=> every

setw -g

set window title to

automatic-rename

current command

interactive dialog

window

(promt)
d

detach session

tmux restore

restore session

: source-file

reload .tmux.conf

bind-key C-a last-

switch to last

To use

window

active window

hit Ctrl-a
twice

unbind %

Remove

on
Basic Window Handling
c

new window

binding

rename window

bind |

bind vertical

next window

split-window -h

splitting to |

previous window

Session handling

bind

bind horizontal

previously selected window

tmux

split-window -v

splitting to -

list all windows

[0-9]

move to window number [0-

~/.tmux.conf

default split

big clock

list bindings

start new

tmux new -s

start new with name

myname

set -g status-bg black


set -g status-fg white

tmux a -t

9]

reattach session (or at,

set -g status-left

beginning of

f [window

or attach)

#[fg=green]#H

statusbar

name]

tmux a -t myname

reattach named session

tmux ls

list sessions

tmux kill-session -t

kill named session

myname

hostname in
green
set-window-

current window

option -g

shown in red

find window

: list-windows

list windows

&

kill window

move window

window-statusAdvanced Window Handling

:new

new session

current-bg red

list sessions

set -g status-right

number of

move-window [ d] [ s src-window] [ t dst-

name session

#[fg=yellow]#

users and load

window]

(uptime | cut -d ,

average for

-f 2-)

computer

swap-window [ -d] [ -s src-window] [ -t dst-

setw -g monitor-

highlight

activity on

window with

tmux kill-server

kill server and all


sessions

window]

new activity

By bechtold

Published 8th July, 2013.

Sponsored by Readability-Score.com

cheatography.com/bechtold/

Last updated 28th April, 2014.

Measure your website readability!

Page 1 of 2.

https://readability-score.com

tmux the terminal multiplexer Cheat Sheet


by bechtold via cheatography.com/7346/cs/1134/

Pane Window Handling

Basic Pane Handling

tmux info

:joinp -

move window 2 into a new pane in

split vertically

list bindings

s :2

the current window

split horizontally

Set pane

printf '\033]2;%s\033\\' 'title goes

:joinp -

move the current pane into a new

split-windo

title

here'

t :1

pane in window 1

Vim like commands


bind s

go to next pane (down-pane)

show pane number, press


number to go to

splitting

split-window -v
bind v

splitting

split-window -h
bind h select-

move current pane left

move current pane right

kill pane

motion keys

pane -L

Advanced Pane Handling

bind j select-pane

motion keys

-D
bind k select-

motion keys

pane -U
bind l select-pane

motion keys

-R
setw -g mode-

vim motion keys while in

keys vi

copy mode

bind - resize-

resize pane down by 1

<spac

toggle through

e>

layouts

break-

take a pane and

pane

make own

resize

resize pane down

(20)

by 20 cells

-U

resize up

(20)

(by 20
cells)

resize pane up by 1

-L

resize left

(20)

(by 20

resize pane to left by 1

cells)

pane -L 1
bind > resize-

stays

-pane

pane -U 1
bind < resize-

focus

window

pane -D 1
bind + resize-

-d

resize pane to right by 1

-R

resize right

(20)

(by 20

pane -R 1

cells)
-t 2

pane with

20

id 2 down
by 20

...

By bechtold

Published 8th July, 2013.

Sponsored by Readability-Score.com

cheatography.com/bechtold/

Last updated 28th April, 2014.

Measure your website readability!

Page 2 of 2.

https://readability-score.com