Effortless Command History Search with `Ctrl+R`

Quick Tip

Effortless Command History Search with `Ctrl+R`

Challenge: You need to recall and re-execute a command you ran previously, but you don’t remember the exact syntax or want to avoid scrolling through endless history.

The Solution: Utilize the reverse-i-search feature in your shell by pressing Ctrl+R and then start typing any part of the command you’re looking for.

Ctrl+R

Why it works: This command initiates an interactive search through your shell’s command history. As you type, the shell will display the most recent matching command, allowing you to quickly find and execute it. Press Enter to run the displayed command, or Ctrl+R again to cycle through older matches.

Pro-Tip: Once you’ve found the command you want, pressing the Left Arrow key (←) will place the command on the command line for editing before execution.

Linux Tips & Tricks | © ngelinux.com | 5/3/2026

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments