tmux - terminal multiplexer Cheat Sheet

A Software › Linux cheat sheet in English by alexandreceolin

tmux - terminal multiplexer keyboard shortcuts

22,353 views 6,469 downloads 13 Nov 2015 History
3.7 avg · 0 ratings

General

start tmux
tmux
default prefix
^b (control + b)
list bindings
^b ? or tmux list-keys
big clock
^b t

Config

reload config
tmux source­-file ~/.tmu­x.conf
show config
tmux show-o­ptions -g

Bash aliases

alias clear='/usr/bin/clear;tmux clear-history'
alias tmux='tmux -2'

Custom Commands

clear terminal and history
^b ^l
reload tmux config file
^b ^r

Config file (~/.tm­ux.c­onf)

set -g history-limit 10000
set -g default-terminal "tmux-256color-italic"
set -g mouse on
setw -g xterm-keys on

# change prefix key
#set -g prefix C-a 
#bind-key C-a send-prefix
#unbind-key C-b 

# new-window starts in current directory
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"

# custom commands
bind-key C-l send-keys "clear" \; send-keys "Enter"
bind-key C-r source-file ~/.tmux.conf \; display-message "~/.tmux.conf is reloaded"

Session

list
tmux ls or ^b s
attach
tmux a
attach and detach others
tmux a -d
detach current client
^b d
detach other clients
^b D

Pane

split vertically
^b %
split horizo­ntally
^b "
next
^b o
previous
^b ;
show pane number
^b q
swap pane location
^b ^o
move pane left
^b {
move pane right
^b }
navigate
^b arrow key
resize
^b ^arrow key
change layout
^b space
kill current
^b !
zoom (in/out)
^b z

Window (tab)

new
^b c
close
^d or ^b x
next
^b n
previous
^b p
rename
^b ,
list all
^b w
jump to
^b number

Scroll and Clipboard (emacs mode)

start
^b [
exit
q
search up (reverse)
^r
search down
^s
search next
n
start selection
^space
copy selection and exit
^w
start of line
^a
end of line
^e
top
alt <
bottom
alt >
goto line
g
next word
alt f
previous word
alt b
list copied buffers
^b =
paste
^b ]
X11 copy
shift left click
X11 paste
shift middle click

Fix terminal italics and standout

# file: tmux-256color-italic.terminfo
# A 256 color terminal with
# italics and standout 
tmux-256color-italic|Terminal tmux,
  sitm=\E[3m, ritm=\E[23m,
  smso=\E[7m, rmso=\E[27m,
  use=screen-256color,
Use: $ tic tmux-2­56c­olo­r-i­tal­ic.t­er­minfo Test: $ echo `tput sitm`i­tal­ics­`tput ritm`
italics
$ echo `tput smso`s­tan­dou­t`tput rmso`
standout

Badges

Nice Cheat Sheet Good Cheat Sheet

Comments

No comments yet.

Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.