8.5 Bash Command-line Editing
Early shell environments did not provide any form of line editing capabilities. This meant that if you spotted an error at the beginning of a long command-line you were typing, you had to delete all the following characters, correct the error and then re-enter the remainder of the command. Fortunately Bash provides a wide range of command-line editing options as outlined in the following table:
Key Sequence |
Action |
Ctrl-b or Left Arrow |
Move cursor back one position |
Ctrl-f or Right Arrow |
Move cursor forward one position |
Delete |
Delete character currently beneath the cursor |
Backspace |
Delete character to the left of the cursor |
Ctrl... |