Show Menu
Cheatography

custom - bash key bindings Cheat Sheet by

Cursor movement

Beginning of the line
Ctrl-a
0
End of the line
Ctrl-e
$
Previous word
Alt-b
b
Next word
Alt-f
w
Previous character
Ctrl-b
h
Next character
Ctrl-f
l

Dele­ting

Character under the cursor
Ctrl-d
x
Character before the cursor
Ctrl-h
X
From the cursor to the beginning of line
Ctrl-u
d0
From the cursor to the end of line
Ctrl-k
D
Line
Ctrl-e Ctrl-u
dd
From the cursor to the beginning of the word
Ctrl-w
db
From the cursor to the end of the word
Alt-d
dw
Word around the cursor
Alt-b Alt-d
bdw
Paste text that was cut using deletion shorcut
Ctrl-y

Command editing

Clear screen
Ctrl-l
Ctrl-l
Terminate command
Ctrl-c
Ctrl-c
Send EOT char to current process
Ctrl-d
Ctrl-d
Suspen­d/stop command
Ctrl-z
Ctrl-z
Search command history
Ctrl-r
Ctrl-r
Autoco­mpl­etion
tab
tab
Undo
Ctrl-_
u
 

Tmux command line

Create session foo and attach
tmux new -s foo
List sessions
tmux ls
Attach to session foo
tmux attach -t foo
Kill session foo
tmux kill-s­ession -t foo
Reload tmux.conf
tmux source­-file ~/.tmu­x.conf
Swap window 2 with 3
prefix : swap-w­indow -s 2 -t 3
Move window to unused one (i.e to 4)
prefix : move-w­indow -t 4

Tmux key bindings

Prefix
Ctrl-b
Create new window
prefix c
Rename window || session
prefix , || prefix $
Split pane horizontal
prefix -
Split pane vertical
prefix \
Select left/right pane
Shift-­lef­t/r­igh­tArrow
Select bottom/up pane
Shift-­dow­n/u­pArrow
Select next window
Ctrl-]
Select previous window
Ctrl-[
Kill current pane
prefix x || Ctrl-d
Kill current window
prefix Q
Swap this pane with previo­us/next one
prefix { / prefix }
Toggle panes layouts
prefix spacebar
Cycle through sessions
prefix ( or )
Enter copy mode
prefix [ or prefix PgUp
Start selection
Ctrl-s­pacebar
Copy selection
Ctrl-w
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Linux Command Line Cheat Sheet
          Bash/ZSH Shourtcuts Cheat Sheet
          bash Shortcuts Cheat Sheet