!!
The previous line, whole, brought back — sudo !! is the classic portrait.
The most famous event designator: it expands to the last command executed, exactly as typed. The canonical use is forgetting sudo — and fixing it with three keystrokes instead of rescuing the line with the arrow keys.
Before running, the shell prints the expanded line, so you can see what came back. And !! is the root of larger expressions: !!:2 grabs the second word, !!:s/old/new/ swaps a piece before repeating.
$ pacman -Syu
error: you cannot perform this operation unless you are root.
$ sudo !!
sudo pacman -Syu