DELAPARRA
Index
Color
NL
Category: Keyboard shortcuts

Reverse History Search

Explained by Updated

What is Reverse History Search?

Reverse History Search: Search backwards through your command history as you type. Saves retyping long commands. Reverse history search finds earlier commands as you type. Press Ctrl+R in Bash or Zsh, type part of a command, and the most recent match appears. Press Ctrl+R again for older matches, Enter to run it, or an arrow key to edit it first.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Reverse History Search

How is Reverse History Search used in practice?

It saves retyping long commands, like a Docker command with many options or the exact kubectl command you used last week.

What should you keep in mind with Reverse History Search?

Tools like fzf make it even better, showing an interactive, searchable list of your history. Increase your history size in your shell configuration so useful commands are not forgotten. And be aware that commands with passwords or tokens typed directly end up in your history too. Many shells skip commands that start with a space, which is a handy way to keep such lines out.

At a glance

CategoryKeyboard shortcuts
Explained by
Updated

More Keyboard shortcuts terms

All terms starting with R

Skills

Manuals

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.