0% found this document useful (0 votes)
155 views1 page

Bash Shortcuts Cheat Sheet: by Via

This document provides a cheat sheet of keyboard shortcuts for the bash shell. It lists shortcuts for moving the cursor, controlling commands, cutting/pasting/deleting text, manipulating text, recalling commands from history, and using bang (!) commands to rerun previous commands with modifications. The shortcuts allow users to navigate and edit commands efficiently from the keyboard in bash without using a mouse.

Uploaded by

ijbasura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
155 views1 page

Bash Shortcuts Cheat Sheet: by Via

This document provides a cheat sheet of keyboard shortcuts for the bash shell. It lists shortcuts for moving the cursor, controlling commands, cutting/pasting/deleting text, manipulating text, recalling commands from history, and using bang (!) commands to rerun previous commands with modifications. The shortcuts allow users to navigate and edit commands efficiently from the keyboard in bash without using a mouse.

Uploaded by

ijbasura
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

bash Shortcuts Cheat Sheet

by Ryan Johnson (CITguy) via cheatography.com/138/cs/832/

bash - Movement

bash - Command Control

bash - Cut/Paste/Delete

Ctrl + A

Ctrl + L

Ctrl + U

go to the start of the command line


Ctrl + E

clear screen
Ctrl + S

go to the end of the command line

(toggle) beginning of line/cursor position

previous word begin

next word end

from cursor, delete to start of word


Alt + D
from cursor, delete to end of word
Ctrl + D

Ctrl + Z
suspend command/send to background

Ctrl + F

Ctrl + W

Ctrl + C
terminate command

Alt + F

from cursor, delete to end of line

Ctrl + Q
allow screen output (undo Ctrl+S)

Alt + B

Ctrl + K

stops screen output (for verbose


commands)

Ctrl + XX

from cursor, delete to start of line

(use fg to bring forward)

delete character under cursor


Ctrl + H

forward one character

delete character before cursor


Letters do NOT need to be uppercase

Ctrl + B
back one character
Letters do NOT need to be uppercase
bash - Manipulation
Alt + C

Alt + U

Ctrl + R
search history backward
Ctrl + G

Ctrl + P
previous command in history (walk back)

from cursor, uppercase to end of word


Alt + L

Ctrl + N
next command in history (walk forward)

from cursor, lowercase to end of word


Alt + T

Alt + .
last word of previous command

transpose word with previous word


Letters do NOT need to be uppercase

Ctrl + T

after cursor, paste cut/deleted text

bash - Command Recall

escape from history search mode

from cursor, capitalize to end of word

Ctrl + Y

transpose character with previous character

Letters do NOT need to be uppercase


bash - Bang (!) Commands
!!
run last command
!foo
run most recent command starting with 'foo'
!foo:p
print most recent command starting with 'foo'
!$
last word of previous command (Alt + .)
!*
previous command without last argument
!*:p

Letters do NOT need to be uppercase

print previous command without last


argument

By Ryan Johnson (CITguy)

Published 11th February, 2013.

Sponsored by Readability-Score.com

cheatography.com/citguy/

Last updated 5th June, 2014.

Measure your website readability!

Page 1 of 1.

https://readability-score.com

You might also like