I typically rely on vi
mode for editing commands, but !!
could be useful for those who don’t, as it recalls the last command. Useful for adding a forgotten sudo
or making quick adjustments.
Note that can use !b
to recall the most recent command starting with b
. It works with any letter.