I sometimes start writing a command in the terminal (iTerm2) which half-way written I want to erase.
How can quickly remove all the characters on the line being worked on in the terminal?
To clear everything before the cursor position, use
To clear everything after the cursor position, use
These are some of the basic Bash keyboard shortcuts.