Shouting sudo 0 ▲ Blog on blog.gnoack.org 14 days ago · Tech · hide · Fediverse post When a command fails because you forgot that you need to be root: $ pacman -Suy error: you cannot perform this operation unless you are root. Then you can shout “sudo” at your shell: $ sudo !! sudo pacman -Suy [sudo] password for gnoack: ... The !! expands into the previous command in your shell history. If you revisit that command in your shell history afterwards, you’ll find that it was actually recorded as sudo pacman -Suy. Documentation for this feature is in the “History Expansion” section of bash(1). Thanks Alejandro for sharing this trick! Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town