Handy shortcuts of Linux Bash terminal


I have been using Linux operating system since the year 2008. And while working on any Unix-like systems, our main interface as developers is to use the terminal, and most probably bash environment.

To get our most of the work done, inside the terminal, we need arrow keys. But life shouldn’t be lived in that lame way. There are better shortcuts available at your disposal, those allow you to work with words in a single shot, instead of manipulating the characters in the terminal one-by-one.

Here are some of the shortcuts you may find useful:

Keyboard shortcutDescription of the shortcut
Ctrl+BMoves the cursor left
Ctrl+FMoves the cursor right
Ctrl+PView the previous command (Moves the cursor up)
Ctrl+NView the next command (Moves the cursor down)
Ctrl+AMoves the cursor to the beginning of the line
Ctrl+EMoves the cursor to the end of the line
Ctrl+WErases the preceding word
Ctrl+UErases the cursor to the beginning of the line
Ctrl+KErases from the cursor to the end of the line
Ctrl+YPastes erased text (i.e., from Ctrl+U)
Alt+BackspaceDeletes one word at a time
Ctrl+Left ArrowMoves one word left at a time
Ctrl+Right ArrowMoves one word right at a time

These few shortcut keys are really helpful in doing everyday work on the prompt without leaving your keyboard, and saving you some milliseconds. One plus point is, these shortcuts work without any problem, even if you are inside MySQL or Node.js prompt.

Let’s see, how much you gain from these shortcuts.

Thanks for reading till here. See you next time.


© 2017. Creative Commons.

Powered by Hydejack v6.3.0