user
In shell or bash, how to erase current full line with a keyboard shortcut?
alphonsio

In a shell, such as Bash, you can erase a full line using the following keyboard shortcuts:

  1. Ctrl+C Cancel the current command/line.

  2. Ctrl+E Ctrl+U Clean up the line (wipe the current line in the terminal)

  3. Ctrl+A Ctrl+K Clean up the line (wipe the current line in the terminal)

  4. Ctrl + U: This shortcut erases the line from the cursor's current position to the beginning of the line.

  5. Ctrl + K: This shortcut erases the line from the cursor's current position to the end of the line.

  6. Ctrl + L: These commands clear the entire screen, not just the current line (same as clear command).