NOTE: this is a markdown, slightly edited version of this article
The bash shell has a very rich array of convenient shortcuts. This ability to edit the command line using shortcuts is provided by the GNU Readline library. This library is used by many other *nix application besides bash, so learning some of these shortcuts will not only allow you to zip around bash commands with absurd ease, but can also make you more proficient in using a variety of other *nix applications that use Readline. By default Readline uses emacs key bindings, although it can be configured to use the vi editing mode. If you’re familiar with emacs then many of these shortcuts will not be new to you.
Ctrl + a
– go to the start of the command lineCtrl + e
– go to the end of the command lineCtrl + k
– delete from cursor to the end of the command line- `Ctrl