Show Menu
Cheatography

tmux Cheat Sheet (DRAFT) by

This is a Cheatsheet from !Oh my tmux and my personal tmux edition in the .tmux.conf

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Outside Sessions

tmux
tmux: start a new termux session
tmux ls
list-s­ess­ions: show listed session
tmux attach [-t foo]

tmux a [-t foo]

attach­-se­ssion: attach to target session
foo
tmux kill-server
kill-s­erver: tmux kill all sessions
tmux kill-session [-t target]
kill-s­ession: destroy the
target
session
tmux new [-s foo]
new-se­ssion: start session named as
foo
tmux rename [-t foo] bar
rename­-se­ssion: rename the target session as
bar
.
tmux lscm
list-c­omm­ands: list all commands supported
to more
cmds
about session check the Official Manual [link]

.tmux.conf

#setting prompt color
set -g default-terminal "xterm-256color"

TMUX_CONF="~/.tmux.conf"
TMUX_EDITOR="vim"

unbind C-b                        # disable default <prefix>
set -g prefix C-a                 # <prefix>      as C-a
bind a send-prefix                # <prefix>a     as normal C-a
bind C-a send-prefix              # <prefix>C-a   as normal C-a
set -g base-index 1               # start at 1
setw -g pane-base-index 1
set -g mouse 1

# =========VIM=========
#Move to the panel as VIM -> <prefix>hjkl
bind h select-pane -L             # <prefix>h     select left-pane
bind j select-pane -D             # <prefix>j     select down-pane
bind k select-pane -U             # <prefix>k     select up-pane
bind l select-pane -R             # <prefix>l     select right-pane
bind C-h previous-window          # M-h           select previous-window
bind C-l next-window              # M-l           select next-window

bind r source-file $TMUX_CONF \; display "$TMUX_CONF reloaded"                        # <prefix>r     as reload config_file
bind e new-window -n "$TMUX_CONF" "$TMUX_EDITOR $TMUX_CONF && tmux source $TMUX_CONF"          # <prefix>e     open config_file
bind '%' split-window -h -c "#{pane_current_path}"
bind '"' split-window -v -c "#{pane_current_path}"

# =======TESTING=======
.tmux.conf is the config­uration file and you can create it in the $HOME directory
~/.tmu­x.conf

download last version link
 

Shortcuts tmux

C-a
+
%
◫ Split terminal Vertically
C-a
+
"
⊟ Split terminal Horizo­ntally
C-a
+ [
h j k l
]
◨ Move between panels
C-a
+
q
+
[number]
show/s­elect panel
[number]
C-a
+
[space]
Reorder panels
C-a
+ [
< >
]
Swap Panel
C-a
+
x
Close panel
C-a
+
:kill-­panel
C-a
+
z
Toogle Maximaize Panel
C-a
+
c
Create new window
C-a
+ [
C-h C-l
]
move between windows
C-a
+
[number]
Select window
[number]
C-a
+
[tab]
Previous window
C-a
+
&
Close window
C-a
+
:kill-­window
C-a
+
[m]
Toggle mouse mode
C-a
+
e
Open
~/.tmu­x.c­onf.local
C-a
+
r
reload
.tmux.conf
C-a
+
[Enter]
Enter into copy-mode
C-a
+
:
go to tmux comman­d-line
C-a
is the prefix, the default prefix is
C-b

full command list
https:­//g­ith­ub.c­om­/gp­ako­sz/.tmux
 

list of commands in commad­-line

kill-server
Kill all instances of tmux
kill-window
Close window
C-a
+
&
kill-panel
Close panel
C-a
+
x

More Info

https:­//t­mux­che­ats­hee­t.com/
https:­­//­g­i­th­­ub.c­­o­m­/­gp­­ako­­sz­/.tmux