The Linux / Unix bash shell is very kind with the users. It offers some shortcuts that can really save its users day.
In this article I will make a list of bash shortcuts usefull for editing commands:
Jump to the beginning of the line: Ctrl – a ;
Jump to the back of the line: Ctrl -e ;
Jump one word forward: Alt – f
Jump one word backwords: Alt – b
Delete from cursor to the end of the word: Alt – d
Delete from the cursor to the beginning of the word: Alt – Backspace
Delete from the cursor to the end of the line: Ctrl – k
Delete from the cursor to the beginning of the line: Ctrl – u
Paste (or Yank): Ctrl – y
The combination of keys I have written here are very usefull when you need to edit long oneliner commands.
To read more bash tricks, read readline’s man:
$ man readline