How to reset an edited history line in Bash

bashcommand linehistory

In Bash, you can press the up (and down) arrow to traverse through history. You can then modify the command before executing it. Sometimes I've incorrectly modified the command, and wish to reset it to what was in history originally. Is there a way to do this?

I've tried executing a blank line, and then traversing through history again, but the pertinent line remains edited.

Best Answer

Undo is C-x C-u (or C-_, for which you may have to type C-/)