$
vpp
.dk
Linux tricks, one-liners & shell magic
All Tricks
WP Admin
← 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 !!
lazyadmin
2026-04-19
Scripting
✎ Edit
🗑 Delete
Delete this trick?
This cannot be undone.
Yes, delete
Cancel
Title
*
Description
Forgot to sudo? Run the previous command with root privileges without re-typing it.
Code Snippet
*
sudo !!
Your name / handle
Categories
Disk & Storage
File Management
Networking
Process Management
Scripting
SSH & Remote
System Info
Text Processing
✓ Save
Cancel