Repeat Last Command

How

  1. Type !! and press Enter to run the last command
  2. You can also press the Up arrow to recall the last command, then edit it before running

Try this

Run ls, then type !! and press Enter. Notice how it runs ls again without you typing it.

Why it works

Fix small mistakes fast.

Open full demonstration ↗