Quick Tip
Effortless Command Recall with `fc`
Challenge: You made a slight typo in a previous command, or you want to quickly modify and re-run a command you just executed.
The Solution: Use the `fc` command.
fc
Why it works: When run without arguments, `fc` opens your default editor with the last command you entered. Make your corrections, save, and exit the editor, and the corrected command will be executed. You can also use `fc -e -` to use `vi` or `fc -e nano` to use `nano` as your editor.
Pro-Tip: You can specify a range of commands to edit, for example, `fc 10 20` will open commands 10 through 20 in your editor.
Linux Tips & Tricks | © ngelinux.com | 5/10/2026
