Quick Tip
Effortless Command Recall with `Ctrl+R` and `fc`
Challenge: You’re working in the terminal and need to recall a command you executed recently, but can’t quite remember the exact syntax or want to re-run it with minor modifications.
The Solution: Bash provides powerful tools for command history recall. Use Ctrl+R for interactive reverse-i-search, or fc to edit and re-run previous commands.
# For interactive search: Ctrl+R # To edit and re-run the last command: fc # To edit and re-run the 10th command from the end: fc -10
Why it works: Ctrl+R allows you to incrementally type characters, and Bash will show the most recent command matching that string, letting you cycle through matches. `fc` (fix command) opens the specified command in your default editor, and upon saving and exiting, it will execute it.
Pro-Tip: Combine `fc` with `!!` to edit and re-run the very last command you executed. For instance, `fc $(!!)` would edit the last command.
Linux Tips & Tricks | © ngelinux.com | 5/15/2026
