In Ubuntu 12.04 I use CTRL-R to enter a reverse history search. If the command I want is not found (after repeated CTRL-R), how do I immediately exit back to the (empty) command prompt with no historical command entered or executed on the command line?
CtrlG this will abort the search
You can use:
- The Emacs style keyboard quit command, Ctrl-G. Default key bindings in
bashare purposefully Emacs-like.
- The Vi style return to normal mode key bindings, Esc or Ctrl-[ (they're the same thing) .
- Send a SIGKILL signal, Ctrl-C.
The first two have the least visible effect.