0% found this document useful (0 votes)
32 views2 pages

Minimum List of Useful Bash Shortcuts

This document provides a concise list of useful bash shortcuts organized into categories like navigation, editing, processes, and history. Some examples include Ctrl+a to go to the beginning of the line, Alt+b to move back one word, Ctrl+l to clear the screen, and Ctrl+r for reverse searching the bash history. The shortcuts are accompanied by simple methods for memorizing them, like relating Ctrl+a to the first letter of the alphabet or Ctrl+z to "zzzz" for sleep.

Uploaded by

Ariel Armijo
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)
32 views2 pages

Minimum List of Useful Bash Shortcuts

This document provides a concise list of useful bash shortcuts organized into categories like navigation, editing, processes, and history. Some examples include Ctrl+a to go to the beginning of the line, Alt+b to move back one word, Ctrl+l to clear the screen, and Ctrl+r for reverse searching the bash history. The shortcuts are accompanied by simple methods for memorizing them, like relating Ctrl+a to the first letter of the alphabet or Ctrl+z to "zzzz" for sleep.

Uploaded by

Ariel Armijo
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/ 2

Minimum list of useful bash

shortcuts
December 08, 2019 · 3 mins to read

I often end up googling “bash shortcuts” and every result lists a huge list of shortcuts available in bash,
some of them are overridden by other utils, like fzf or by your terminal itself, some of them are not that
helpful. I compiled the minimal list of shortcuts and commands which can increase your productivity in
bash.

Note: MacOS iTerm 2 users must turn on meta key - https://coderwall.com/p/_lmivq

A good visual cheatsheat of shortucts taken from Clement Chastagnol’s article:

Also, in the description I’ll say how I memorize the shortcuts.

Shortcut Description Memorization

Navigation

a is the 1st letter of


Ctrl + a Go to the beginning of the line. alphabet, hence the
beginning of the line.

Ctrl + e Go to the end of the line. e nd.

Move cursor back one word, will jump to the current word’s
Alt + b rst character or if already there to the previous word’s rst b ack.
character.

Move cursor forward one word, will jump to the next word’s
Alt + f f orward.
rst character.
Shortcut Description Memorization

Toggle between the current cursor position and the


Ctrl + x  
beginning of the line. Very handy when you want x typo in
x
the program name and come back.

Edit

just remember it’s Ctrl


Ctrl + _ Undo.
+ Shift + -

Ctrl + u Delete the line before the cursor.

Ctrl + k Delete the line after the cursor.

Ctrl + w Delete the word before the cursor. w ord.

Ctrl + y Paste the last deleted item. y ank.

Ctrl + x ,
Edit the current command in your $EDITOR .
Ctrl + e

Processes

Ctrl + l Clear screen c l s (hello BASIC)

Ctrl + z Move current process to background. Use fg to bring back. z Zzzz (sleep)

Ctrl + c Send SIGINT to the current process.

Exit the current shell (also works in SSH, so need to type


Ctrl + d d own
exit ).

Enter , ~ ,
Exit stalled SSH session
.

History

Ctrl + r Reverse search of bash history. r everse

All other shortcuts can be found in man bash . To understand the syntax read Readline Notation section
rst and then move on to Commands for Moving .

Another helpful cheatsheat with Bash shortcuts and features can be found at iptheweb/bash-shortcuts-
cheat-sheet.

You might also like