Linux tricks, one-liners & shell magic
← Back to all tricks
Repeat last command as root

Forgot to sudo? Run the previous command with root privileges without re-typing it.

bash
$ sudo !!
lazyadmin2026-04-19
Delete this trick? This cannot be undone.